/// <summary> /// /// </summary> /// <param name="e"></param> private void NotifyConfigChanged(ConfigChangedEventArgs e) { Delegate[] invocationList = null; lock (eventHandlersLock) { ConfigChangedEventHandler handler = eventHandles[e.GetParameter.GroupName] as ConfigChangedEventHandler; if (handler != null) { invocationList = handler.GetInvocationList(); } } try { if (invocationList != null) { foreach (ConfigChangedEventHandler callback in invocationList) { if (callback != null) { callback(this, e); } } } } catch // (Exception e) { //EventLog.WriteEntry(GetEventSourceName(), Resources.ExceptionEventRaisingFailed + GetType().FullName + " :" + e.Message); } }
/// <summary> /// <para>Raises the <see cref="Changed"/> event.</para> /// </summary> protected virtual void OnChanged() { ConfigChangedEventHandler callbacks = (ConfigChangedEventHandler)_eventHandlers[_configChangedKey]; ConfigChangedEventArgs eventData = this.BuildEventData(); try { if (callbacks != null) { foreach (ConfigChangedEventHandler callback in callbacks.GetInvocationList()) { if (callback != null) { callback(this, eventData); } } } } catch (Exception e) { LogException(e); } }