static void Main(string[] args) { string fileName; PhysicalParser parser; Record record; if (args.Length < 1) { Console.WriteLine("Usage:"); Console.WriteLine(" PQDIFDump FILENAME"); Environment.Exit(0); } fileName = args[0]; parser = new PhysicalParser(fileName); parser.Open(); while (parser.HasNextRecord()) { record = parser.NextRecord(); Console.WriteLine(record); Console.WriteLine(); } Console.ReadLine(); }
/// <summary> /// Creates a new instance of the <see cref="LogicalParser"/> class. /// </summary> /// <param name="fileName">Name of the PQDIF file to be parsed.</param> public LogicalParser(string fileName) { m_physicalParser = new PhysicalParser(fileName); }
/// <summary> /// Creates a new instance of the <see cref="LogicalParser"/> class. /// </summary> /// <param name="stream">The stream containing the PQDIF file data.</param> /// <param name="leaveOpen">True if the stream should be closed when the parser is closed; false otherwise.</param> /// <exception cref="ArgumentNullException"><paramref name="stream"/> is null.</exception> /// <exception cref="InvalidOperationException"><paramref name="stream"/> is not both readable and seekable.</exception> public LogicalParser(Stream stream, bool leaveOpen = false) { m_physicalParser = new PhysicalParser(null); m_allDataSourceRecords = new List <DataSourceRecord>(); Open(stream, leaveOpen); }
/// <summary> /// Creates a new instance of the <see cref="LogicalParser"/> class. /// </summary> /// <param name="filePath">Path to the PQDIF file to be parsed.</param> public LogicalParser(string filePath) { m_physicalParser = new PhysicalParser(filePath); m_allDataSourceRecords = new List <DataSourceRecord>(); }
/// <summary> /// Creates a new instance of the <see cref="LogicalParser"/> class. /// </summary> /// <param name="stream">The stream containing the PQDIF file data.</param> /// <param name="leaveOpen">True if the stream should be closed when the parser is closed; false otherwise.</param> /// <exception cref="ArgumentNullException"><paramref name="stream"/> is null.</exception> /// <exception cref="InvalidOperationException"><paramref name="stream"/> is not both readable and seekable.</exception> public LogicalParser(Stream stream, bool leaveOpen = false) { m_physicalParser = new PhysicalParser(null); Open(stream, leaveOpen); }
/// <summary> /// Creates a new instance of the <see cref="LogicalParser"/> class. /// </summary> /// <param name="fileName">Name of the PQDIF file to be parsed.</param> public LogicalParser(string fileName) { m_physicalParser = new PhysicalParser(fileName); DataSourceRecords = new List <DataSourceRecord>(); }
/// <summary> /// Creates a new instance of the <see cref="LogicalParser"/> class. /// </summary> public LogicalParser() { m_physicalParser = new PhysicalParser(); DataSourceRecords = new List <DataSourceRecord>(); }