Ejemplo n.º 1
0
        public void Setup()
        {
            SystemConfigurationSource.ResetImplementation(false);

            System.Configuration.Configuration rwConfiguration = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
            DummySection rwSection;

            rwConfiguration.Sections.Remove(localSection);
            rwConfiguration.Sections.Add(localSection, rwSection = new DummySection());
            rwSection.Name  = localSection;
            rwSection.Value = 10;
            rwSection.SectionInformation.ConfigSource = localSectionSource;

            rwConfiguration.Sections.Remove(externalSection);
            rwConfiguration.Sections.Add(externalSection, rwSection = new DummySection());
            rwSection.Name  = externalSection;
            rwSection.Value = 20;
            rwSection.SectionInformation.ConfigSource = externalSectionSource;

            rwConfiguration.Sections.Remove(localSection2);
            rwConfiguration.Sections.Add(localSection2, rwSection = new DummySection());
            rwSection.Name  = localSection2;
            rwSection.Value = 30;
            rwSection.SectionInformation.ConfigSource = localSectionSource;

            rwConfiguration.Save();

            ConfigurationManager.RefreshSection(localSection);
            ConfigurationManager.RefreshSection(localSection2);
            ConfigurationManager.RefreshSection(externalSection);

            ConfigurationChangeFileWatcher.ResetDefaultPollDelay();

            updatedSectionsTally = new Dictionary <string, int>(0);
        }
 public void Reset()
 {
     context.Dispose();
     ConfigurationChangeFileWatcher.ResetDefaultPollDelay();
 }
 public void ResetStuff()
 {
     ConfigurationChangeFileWatcher.ResetDefaultPollDelay();
 }