private ReadRules ReadRules(StreamReader sr)
        {
            var rules = new ReadRules();

            Console.WriteLine("Reading rules...");
            rules.Requests      = ReadRequests(sr);
            rules.Substitutions = ReadSubstitutions(sr);
            return(rules);
        }
Exemple #2
0
        public Dictionary <string, string> ComposeSubstitutionPairs(ReadRules rules, Dictionary <string, string> excelData)
        {
            var result = new Dictionary <string, string>();

            Console.WriteLine("Composed pairs:");
            foreach (var item in rules.Substitutions)
            {
                var ruleKey   = item.Key;
                var excelName = item.Value;
                if (excelData.ContainsKey(excelName))
                {
                    result[ruleKey] = excelData[excelName];
                    Console.WriteLine(string.Format("{0} : {1}", ruleKey, result[ruleKey]));
                }
            }
            return(result);
        }