Exemplo n.º 1
0
        public void AddSection(string sectionName, object configurationSection, ConfigurationChangedEventHandler changed, IConfigurationChangeWatcherFactory factory)
        {
            lock (lockMe)
            {
                if (DoesWatcherExistFor(sectionName) == false)
                {
                    IConfigurationChangeWatcher watcher = factory.CreateConfigurationChangeWatcher();
                    AddConfigurationWatcherForSection(changed, watcher);
                }

                AddSection(sectionName, configurationSection);
            }
        }
Exemplo n.º 2
0
        public void AddSection(string sectionName, object configurationSection, ConfigurationChangedEventHandler changed, IConfigurationChangeWatcherFactory factory)
        {
            lock (lockMe)
            {
                if (DoesWatcherExistFor(sectionName) == false)
                {
                    IConfigurationChangeWatcher watcher = factory.CreateConfigurationChangeWatcher();
                    AddConfigurationWatcherForSection(changed, watcher);
                }

                AddSection(sectionName, configurationSection);
            }
        }