Example #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);
            }
        }
Example #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);
            }
        }