public void SimpleTest() { var config1 = Path.Combine(Helper.GetDataPath(), "Folder"); var config2 = Path.Combine(Helper.GetDataPath(), "Folder\\SubFolder"); var config3 = Path.Combine(Helper.GetDataPath(), "Folder\\SubFolder\\SubSubFolder"); SettingsBrowser browser = new SettingsBrowser(); var res1 = browser.GetSettings(config1); var res2 = browser.GetSettings(config2); var res3 = browser.GetSettings(config3); Assert.AreEqual(res1["Acropolis.SolutionFolder"].Value, "d:\\Projects\\Ajeva Project"); Assert.AreEqual(res2["Acropolis.SolutionFolder"].Value, "d:\\Projects\\Ajeva Project"); Assert.AreEqual(res3["Acropolis.SolutionFolder"].Value, "c:\\Server\\Web\\ajeva.com\\Web"); }
public List<String> Transform(String contextPath, String settingsPath = "") { var configs = FileSearcher.Search(contextPath, SettyConstants.SearchConfigsNames); var settingsBrowser = new SettingsBrowser(); var transformerSelector = new TransformerSelector(); foreach (var config in configs) { var info = GetDirectoryOfFile(config); var output = GetOutputFilePath(config); var settings = settingsBrowser.GetSettings(info, settingsPath); var transformer = transformerSelector.Select(config); transformer.Transform(config, output, settings); } return configs; }
public List <String> Transform(String contextPath, String settingsPath = "") { var configs = FileSearcher.Search(contextPath, new List <string> { "Web.config.xslt", "App.config.xslt", "NLog.config.xslt", }); var settingsBrowser = new SettingsBrowser(); foreach (var config in configs) { var info = GetDirectoryOfFile(config); var output = GetOutputFilePath(config); var settings = settingsBrowser.GetSettings(info, settingsPath); var transformer = new XsltTransformer(config, output, settings); transformer.Transform(); } return(configs); }