public virtual void SetWatcher(ChoConfigurationChangedEventHandler configurationChangedEventHandler) { if (ConfigurationChangeWatcher != null) { ConfigurationChangeWatcher.SetConfigurationChangedEventHandler(_configElement.ConfigElementPath, configurationChangedEventHandler); } }
public void SetConfigurationChangedEventHandler(object key, ChoConfigurationChangedEventHandler ConfigurationChanged) { List <IChoConfigurationChangeWatcher> configurationChangeWatchers = _configurationChangeWatchers; if (configurationChangeWatchers == null || configurationChangeWatchers.Count == 0) { return; } foreach (IChoConfigurationChangeWatcher configurationChangeWatcher in configurationChangeWatchers) { configurationChangeWatcher.SetConfigurationChangedEventHandler(key, ConfigurationChanged); } }
/// <summary> /// Event raised when the underlying persistence mechanism for configuration notices that /// the persistent representation of configuration information has changed. /// </summary> //public event ChoConfigurationChangedEventHandler ConfigurationChanged; public void SetConfigurationChangedEventHandler(object key, ChoConfigurationChangedEventHandler configurationChanged) { ChoGuard.ArgumentNotNull(key, "key"); ChoGuard.ArgumentNotNull(configurationChanged, "configurationChanged"); OrderedDictionary eventHandlerList = _eventHandlerList; if (eventHandlerList != null) { lock (_eventHandlerListLock) { if (eventHandlerList.Contains(key)) eventHandlerList[key] = configurationChanged; else eventHandlerList.Add(key, configurationChanged); } } }
public void SetConfigurationChangedEventHandler(object key, ChoConfigurationChangedEventHandler configurationChanged) { ChoGuard.ArgumentNotNull(key, "key"); ChoGuard.ArgumentNotNull(configurationChanged, "configurationChanged"); lock (_padLock) { List <IChoConfigurationChangeWatcher> configurationChangeWatchers = _configurationChangeWatchers; if (configurationChangeWatchers == null || configurationChangeWatchers.Count == 0) { return; } foreach (IChoConfigurationChangeWatcher configurationChangeWatcher in configurationChangeWatchers) { configurationChangeWatcher.SetConfigurationChangedEventHandler(key, configurationChanged); } } }
public void SetConfigurationChangedEventHandler(object key, ChoConfigurationChangedEventHandler ConfigurationChanged) { }