コード例 #1
0
        private void CleanupWebConfig()
        {
            var xml         = DatabaseFixture.LoadWebConfig();
            var appSettings = xml.GetElementsByTagName("appSettings")[0];
            var list        = appSettings.SelectNodes("add[@key='UseRuntimeSettingsCache']");

            if (list.Count > 0)
            {
                appSettings.RemoveChild(list[0]);
                xml.Save(DatabaseFixture.FindWebConfigPath());
            }
        }
コード例 #2
0
        private void SetupWebConfig()
        {
            var xml         = DatabaseFixture.LoadWebConfig();
            var appSettings = xml.GetElementsByTagName("appSettings")[0];
            var list        = appSettings.SelectNodes("add[@key='UseRuntimeSettingsCache']");

            if (list.Count == 0)
            {
                var setting = xml.CreateElement("add");
                var attr    = xml.CreateAttribute("key");
                attr.Value = "UseRuntimeSettingsCache";
                setting.Attributes.Append(attr);
                attr       = xml.CreateAttribute("value");
                attr.Value = "false";
                setting.Attributes.Append(attr);
                appSettings.AppendChild(setting);
                xml.Save(DatabaseFixture.FindWebConfigPath());
            }
        }
コード例 #3
0
 public MultiDbDeploy()
 {
     DBF = new DatabaseFixture();
     DocumentManager.Current = new DocumentManager();
 }