public class LogicalParser : IAsyncDisposable,
IDisposable
Public Class LogicalParser
Implements IAsyncDisposable, IDisposable
public ref class LogicalParser : IAsyncDisposable,
IDisposable
Gemstone.PQDIF.Logical.LogicalParser = function();
Type.createClass(
'Gemstone.PQDIF.Logical.LogicalParser',
null,
IAsyncDisposable,
IDisposable);
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.
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());
LogicalParser | Creates a new instance of the LogicalParser class. |
LogicalParser(String) | Creates a new instance of the LogicalParser class. |
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. |
CloseAsync | Closes the PQDIF file. |
Dispose | Releases resources held by the parser. |
DisposeAsync | Releases resources held by the 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) |
HasNextObservationRecordAsync | Determines whether there are any more ObservationRecords to be read from the PQDIF file. |
MemberwiseClone | Creates 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. |
ToString | Returns a string that represents the current object. (Inherited from Object) |