Example #1
0
        static void Test()
        {
            //   var c = new ConfigReplacement();
            //   c.SaveToFile("data.xml");

            var d = ConfigReplacement.LoadFromFile("data.xml");

            Console.WriteLine(d);
        }
Example #2
0
        static void Replace(string sourceFile, string destFile, string dataFile)
        {
            string content = File.ReadAllText(sourceFile);
            var    c       = ConfigReplacement.LoadFromFile(dataFile);

            foreach (var replacement in c.Replacements)
            {
                content = content.Replace(replacement.Key, replacement.Value);
            }
            File.WriteAllText(destFile, content);
        }