internal void OnConfigurationChanged(object sender, ConfigurationChangedEventArgs args) { if (this.ConfigurationChanged != null) { this.ConfigurationChanged(this, args); } }
public void NotifyUpdatedSections(IEnumerable<string> sectionsToNotify) { foreach (string str in sectionsToNotify) { string sectionName = this.CanonicalizeSectionName(str); Delegate[] invocationList = null; lock (this.eventHandlersLock) { ConfigurationChangedEventHandler handler = (ConfigurationChangedEventHandler) this.eventHandlers[sectionName]; if (handler == null) { continue; } invocationList = handler.GetInvocationList(); } ConfigurationChangedEventArgs e = new ConfigurationChangedEventArgs(sectionName); foreach (ConfigurationChangedEventHandler handler2 in invocationList) { try { if (handler2 != null) { handler2(this, e); } } catch (Exception exception) { ManageabilityExtensionsLogger.LogException(exception, string.Format(Resources.Culture, Resources.ExceptionErrorOnCallbackForSectionUpdate, new object[] { sectionName, handler2.ToString() })); } } } }
private void OnConfigurationChanged(object sender, ConfigurationChangedEventArgs args) { if (updatedSectionsTally.ContainsKey(args.SectionName)) { updatedSectionsTally[args.SectionName] = updatedSectionsTally[args.SectionName] + 1; } else { updatedSectionsTally[args.SectionName] = 1; } }
internal void FireConfigurationSectionChangedNotification(string sectionName) { ConfigurationChangedEventHandler callbacks = (ConfigurationChangedEventHandler)eventHandlers[sectionName]; if (callbacks != null) { ConfigurationChangedEventArgs eventData = new ConfigurationChangedEventArgs(sectionName); foreach (ConfigurationChangedEventHandler callback in callbacks.GetInvocationList()) { if (callback != null) { callback(this, eventData); } } } }
public void UpdateLogWriter(object sender, ConfigurationChangedEventArgs args) { if (logWriter != null) { try { LogWriterStructureHolder newStructureHolder = EnterpriseLibraryFactory.BuildUp<LogWriterStructureHolder>(configurationSource); logWriter.ReplaceStructureHolder(newStructureHolder); } catch (ConfigurationErrorsException configurationException) { logWriter.ReportConfigurationFailure(configurationException); } } }
public void NotifyUpdatedSections(IEnumerable<string> sectionsToNotify) { foreach (string rawSectionName in sectionsToNotify) { String sectionName = CanonicalizeSectionName(rawSectionName); Delegate[] invocationList = null; lock (eventHandlersLock) { ConfigurationChangedEventHandler callbacks = (ConfigurationChangedEventHandler)eventHandlers[sectionName]; if (callbacks == null) { continue; } invocationList = callbacks.GetInvocationList(); } ConfigurationChangedEventArgs eventData = new ConfigurationChangedEventArgs(sectionName); foreach (ConfigurationChangedEventHandler callback in invocationList) { try { if (callback != null) { callback(this, eventData); } } catch (Exception e) { ManageabilityExtensionsLogger.LogException(e, String.Format(Resources.Culture, Resources.ExceptionErrorOnCallbackForSectionUpdate, sectionName, callback.ToString())); } } } }
void handler_ConfigurationSectionChanged(object sender, ConfigurationChangedEventArgs e) { this.DoNotifyUpdatedSection(e.SectionName); }
private void ChildConfigurationSectionChanged(object sender, ConfigurationChangedEventArgs args) { configurationSourceHandler.DoConfigurationSectionChanged(args.SectionName); }
private void OnExternalConfigurationChanged(object sender, ConfigurationChangedEventArgs args) { ExternalConfigSourceChanged(args.SectionName); }
private void OnConfigurationChanged(object sender, ConfigurationChangedEventArgs e) { this.UpdateConfiguration(e.SectionName); }
private void DoNotifyUpdatedSection(string sectionName) { Delegate[] invocationList; lock (eventHandlersLock) { ConfigurationChangedEventHandler callbacks = (ConfigurationChangedEventHandler)eventHandlers[sectionName]; if (callbacks == null) { return; } invocationList = callbacks.GetInvocationList(); } ConfigurationChangedEventArgs eventData = new ConfigurationChangedEventArgs(sectionName); try { foreach (ConfigurationChangedEventHandler callback in invocationList) { if (callback != null) { callback(this, eventData); } } } catch // (Exception e) { //EventLog.WriteEntry(GetEventSourceName(), Resources.ExceptionEventRaisingFailed + GetType().FullName + " :" + e.Message); } }
// must be called inside lock void OnConfigurationChanged(object sender, ConfigurationChangedEventArgs args) { ConfigSourceChanged(args.SectionName); }
void compositeConfigurationSource_ConfigurationSectionChanged(object sender, ConfigurationChangedEventArgs e) { DoSourceSectionChanged(e.SectionName); }
private void NotifyUpdatedSections(IEnumerable<string> sectionsToNotify) { foreach (string str in sectionsToNotify) { Delegate[] invocationList = null; lock (this.eventHandlersLock) { ConfigurationChangedEventHandler handler = (ConfigurationChangedEventHandler) this.eventHandlers[str]; if (handler == null) { continue; } invocationList = handler.GetInvocationList(); } ConfigurationChangedEventArgs e = new ConfigurationChangedEventArgs(str); try { foreach (ConfigurationChangedEventHandler handler2 in invocationList) { if (handler2 != null) { handler2(this, e); } } continue; } catch { continue; } } }
private void OnConfigurationChanged(object sender, ConfigurationChangedEventArgs args) { this.ConfigSourceChanged(args.SectionName); }