Beispiel #1
0
 /// <summary>
 /// Opens the parser and parses the <see cref="ContainerRecord"/>.
 /// </summary>
 /// <exception cref="InvalidOperationException"><see cref="FilePath"/> has not been defined.</exception>
 /// <exception cref="NotSupportedException">An unsupported compression mode was defined in the PQDIF file.</exception>
 public void Open()
 {
     m_physicalParser.Open();
     m_containerRecord = ContainerRecord.CreateContainerRecord(m_physicalParser.NextRecord());
     m_physicalParser.CompressionAlgorithm = m_containerRecord.CompressionAlgorithm;
     m_physicalParser.CompressionStyle     = m_containerRecord.CompressionStyle;
 }
Beispiel #2
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();
        }