Exemple #1
0
        private ConfigurationSourceWatcher CreateWatcherForConfigSource(string configSource)
        {
            ConfigurationSourceWatcher watcher;

            if (string.Empty == configSource)
            {
                watcher = new ConfigurationFileSourceWatcher(configurationFilepath,
                                                             configSource,
                                                             refresh,
                                                             this.refreshInterval,
                                                             OnConfigurationChanged);
                configFileWatcher = watcher;
            }
            else
            {
                watcher = new ConfigurationFileSourceWatcher(configurationFilepath,
                                                             configSource,
                                                             refresh && !NullConfigSource.Equals(configSource),
                                                             this.refreshInterval,
                                                             OnExternalConfigurationChanged);
            }

            watchedConfigSourceMapping.Add(configSource, watcher);

            return(watcher);
        }
 private ConfigurationSourceWatcher CreateWatcherForConfigSource(string configSource)
 {
     ConfigurationSourceWatcher watcher = null;
     if (string.Empty == configSource)
     {
         watcher = new ConfigurationFileSourceWatcher(this.configurationFilepath, configSource, this.refresh, new ConfigurationChangedEventHandler(this.OnConfigurationChanged));
         this.configFileWatcher = watcher;
     }
     else
     {
         watcher = new ConfigurationFileSourceWatcher(this.configurationFilepath, configSource, this.refresh && !"__null__".Equals(configSource), new ConfigurationChangedEventHandler(this.OnExternalConfigurationChanged));
     }
     this.watchedConfigSourceMapping.Add(configSource, watcher);
     return watcher;
 }
        // must be called inside lock
        private ConfigurationSourceWatcher CreateWatcherForConfigSource(string configSource)
        {
            ConfigurationSourceWatcher watcher = null;

            if (string.Empty == configSource)
            {
                watcher = new ConfigurationFileSourceWatcher(this.configurationFilepath,
                                                             configSource,
                                                             this.refresh,
                                                             new ConfigurationChangedEventHandler(OnConfigurationChanged));
                configFileWatcher = watcher;
            }
            else
            {
                watcher = new ConfigurationFileSourceWatcher(this.configurationFilepath,
                                                             configSource,
                                                             this.refresh && !NullConfigSource.Equals(configSource),
                                                             new ConfigurationChangedEventHandler(OnExternalConfigurationChanged));
            }

            this.watchedConfigSourceMapping.Add(configSource, watcher);

            return(watcher);
        }
        private ConfigurationSourceWatcher CreateWatcherForConfigSource(string configSource)
        {
            ConfigurationSourceWatcher watcher;

            if (string.Empty == configSource)
            {
                watcher = new ConfigurationFileSourceWatcher(configurationFilepath,
                                                             configSource,
                                                             refresh,
                                                             this.refreshInterval,
                                                             OnConfigurationChanged);
                configFileWatcher = watcher;
            }
            else
            {
                watcher = new ConfigurationFileSourceWatcher(configurationFilepath,
                                                             configSource,
                                                             refresh && !NullConfigSource.Equals(configSource),
                                                             this.refreshInterval,
                                                             OnExternalConfigurationChanged);
            }

            watchedConfigSourceMapping.Add(configSource, watcher);

            return watcher;
        }