Example #1
0
        public TableSpecConverter(TableParserConfig config)
        {
            this.Config = config;
            Dictionary <string, TableDecoder> decoderRing = GenerateDecoderRing(config);

            this.CommonHeaderContentMap = decoderRing;
        }
Example #2
0
        private Dictionary <string, TableDecoder> GenerateDecoderRing(TableParserConfig config)
        {
            var decoderRing = new Dictionary <string, TableDecoder>();

            foreach (var t in config.Tables)
            {
                foreach (var title in t.Titles)
                {
                    decoderRing[title] = t;
                    t.ParseRule        = config.Rules.Where(x => x.Type == t.ParseAs).Single();
                }
            }

            return(decoderRing);
        }
        private Dictionary<string, TableDecoder> GenerateDecoderRing(TableParserConfig config)
        {
            var decoderRing = new Dictionary<string, TableDecoder>();
            foreach (var t in config.Tables)
            {
                foreach (var title in t.Titles)
                {
                    decoderRing[title] = t;
                    t.ParseRule = config.Rules.Where(x => x.Type == t.ParseAs).Single();
                }
            }

            return decoderRing;
        }
 public TableSpecConverter(TableParserConfig config)
 {
     Dictionary<string, TableDecoder> decoderRing = GenerateDecoderRing(config);
     this.CommonHeaderContentMap = decoderRing;
 }