public static void test(string file)
            {
                ExportFileParser parser = new ExportFileParser();

                parser.ExportReader = new StreamReader(file);

                parser.RowParsed +=
                    new ExportFileParser.RowParsedDelegate(testRowParsed);
                parser.InfoParsed +=
                    new ExportFileParser.InfoParsedDelegate(testInfoParsed);

                parser.parse();
            }
Example #2
0
        public CfgSystem GetSystemConfiguration(ILog log)
        {
            ExportFileParser parser = new ExportFileParser();

            parser.ExportReader = ExportReader;
            parser.RowParsed   +=
                new ExportFileParser.RowParsedDelegate(parser_RowParsed);
            parser.InfoParsed +=
                new ExportFileParser.InfoParsedDelegate(parser_InfoParsed);
            parser.Log = log;

            cfgDb = new DatabaseContents();
            parser.parse();
            cfgDb.ResolveReferences();
            CfgSystem result =
                new CfgSystem(
                    new DefaultCfgObjectDecorator(
                        new ExportFileCfgSystem(cfgDb)));

            return(result);
        }