LogicalParser Class

Represents a parser which parses the logical structure of a PQDIF file.

Definition

Namespace: Gemstone.PQDIF.Logical
Assembly: Gemstone.PQDIF (in Gemstone.PQDIF.dll) Version: 1.0.110 -- Release Build+b4919315e8c742e443cd323c6bfaf3fcd0062dd8
public class LogicalParser : IAsyncDisposable, 
	IDisposable
Inheritance
Object    LogicalParser
Implements
IAsyncDisposable, IDisposable

Remarks

This class makes the data from PQD files readily available to applications and defines several redundant properties throughout the logical hierarchy of the PQDIF file to also facilitate the association of definitions with instances within the logical structure. The following list enumerates some of the more useful associations within the hierarchy.

Usage consists of iterating through observations (ObservationRecord) to examine each of the the measurements recorded in the file. As was noted in the list above, the data source (DataSourceRecord) and settings for the monitor (MonitorSettingsRecord) associated with each observation is exposed as a property on the observation record. Note that the same data source and monitor settings records may be referenced by multiple observation records in the file.

The following example demonstrates how to read all observation records from a PQDIF file using the logical parser.

C#
ContainerRecord containerRecord;
List<ObservationRecord> observationRecords = new List<ObservationRecord>();
string filePath = args[0];

await using LogicalParser parser = new LogicalParser(filePath);
await parser.OpenAsync();
containerRecord = parser.ContainerRecord;

while (await parser.HasNextObservationRecordAsync())
    observationRecords.Add(await parser.NextObservationRecordAsync());

Constructors

LogicalParser Creates a new instance of the LogicalParser class.
LogicalParser(String) Creates a new instance of the LogicalParser class.

Properties

ContainerRecord Gets the container record from the PQDIF file. This is parsed as soon as the parser is opened.
DataSourceRecords Gets a list of all DataSource records from the PQDIF file. This is parsed when scanning through the observation records.
FileName Gets or sets the file path (not just the name) of the PQDIF file to be parsed. Obsolete in favor of FilePath.
Obsolete.
FilePath Gets or sets the file path of the PQDIF file to be parsed.

Methods

CloseAsync Closes the PQDIF file.
Dispose Releases resources held by the parser.
DisposeAsync Releases resources held by the parser.
EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetTypeGets the Type of the current instance.
(Inherited from Object)
HasNextObservationRecordAsync Determines whether there are any more ObservationRecords to be read from the PQDIF file.
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
NextObservationRecordAsync Gets the next observation record from the PQDIF file.
OpenAsync Opens the parser and parses the ContainerRecord.
OpenAsync(Stream, Boolean) Opens the parser and parses the ContainerRecord.
ResetAsync Resets the parser to the beginning of the PQDIF file.
ToStringReturns a string that represents the current object.
(Inherited from Object)

See Also