Physical
|
public class PhysicalParser : IDisposable
The PhysicalParser type exposes the following members.
Name | Description | |
---|---|---|
PhysicalParser(String) | Creates a new instance of the PhysicalParser class. | |
PhysicalParser(Stream, Boolean) | Creates a new instance of the PhysicalParser class. |
Name | Description | |
---|---|---|
CompressionAlgorithm | Gets or sets the compression algorithm used by the PQDIF file. | |
CompressionStyle | Gets or sets the compression style used by the PQDIF file. | |
ExceptionList | Gets all the exceptions encountered while parsing. | |
FileName | Obsolete. Gets or sets the file path (not just the name) of the PQDIF file to be parsed. Obsolete in favor of FilePath. | |
FilePath | Gets or sets the file path of the PQDIF file to be parsed. | |
MaximumExceptionsAllowed | Gets or sets the maximum number of exceptions in the exception list before parser will quit. | |
MaximumExceptionsReached | Gets a value that indicates whether the maximum number of exceptions has been reached. |
Name | Description | |
---|---|---|
Close | Closes the PQDIF file. | |
Dispose | Releases all resources held by this parser. | |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object) | |
GetHashCode | Serves as the default hash function. (Inherited from Object) | |
GetType | Gets the Type of the current instance. (Inherited from Object) | |
HasNextRecord | Returns true if this parser has not reached the end of the PQDIF file. | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object) | |
NextRecord | Reads the next record from the PQDIF file. | |
Open | Opens the PQDIF file. | |
Open(Stream, Boolean) | Opens a PQDIF file from a stream of data. | |
Reset | Sets the parser back to the beginning of the file. | |
Seek | Jumps in the file to the location of the record with the given header. | |
ToString | Returns a string that represents the current object. (Inherited from Object) |
Name | Description | |
---|---|---|
GetEnumValueOrDefault |
Gets the enumeration constant for value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions) | |
GetEnumValueOrDefaultT |
Gets the enumeration constant for this value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions) |
This class is used internally by the LogicalParser to read the physical structure of the PQDIF file. If your goal is to read data from a PQD file into an application, you probably do not want to instantiate the physical parser directly. Instead, the logical parser will apply the rules governing the logical structure of the PQDIF file to make the data more readily usable by an application that will be processing that data.
The following example of usage was adapted from the PQDIFDump utility, which represents a bare minimum level of effort to read an uncompressed PQDIF file and display its contents in a console application.
string fileName = args[0]; using (PhysicalParser parser = new PhysicalParser(fileName)) { parser.Open(); while (parser.HasNextRecord()) { Record record = parser.NextRecord(); Console.WriteLine(record); Console.WriteLine(); } }