예제 #1
0
        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();
        }
예제 #2
0
파일: LogicalParser.cs 프로젝트: xj0229/gsf
 /// <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);
 }
예제 #3
0
 /// <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);
 }
예제 #4
0
 /// <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>();
 }
예제 #5
0
 /// <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);
 }
예제 #6
0
 /// <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>();
 }
예제 #7
0
 /// <summary>
 /// Creates a new instance of the <see cref="LogicalParser"/> class.
 /// </summary>
 public LogicalParser()
 {
     m_physicalParser  = new PhysicalParser();
     DataSourceRecords = new List <DataSourceRecord>();
 }