PFSTokenReader Class |
Namespace: DHI.PFS
The PFSTokenReader type exposes the following members.
Name | Description | |
---|---|---|
PFSTokenReader |
Create a reader, opening the file specified.
|
Name | Description | |
---|---|---|
Close |
Close Pfs file.
Any use of the PFSTokenReader after call to close will throw an exception. | |
Dispose | Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. | |
Equals | (Inherited from Object.) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetTokenString |
Get the string related to the current token.
Not all token types have data related to it. Only the following tokens have data:
| |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
NextToken |
Returns the next token in the PFS file
| |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
PFSTokenReader reader = new PFSTokenReader(filename); int tokenCount = 0; PFSToken pfstNextToken; while ((pfstNextToken = reader.NextToken()) != PFSToken.PfsEOF) { if (pfstNextToken == PFSToken.KeyWord && reader.GetTokenString() == "key3") { // Do something with keyword } tokenCount++; } reader.Dispose();