Пример #1
0
        // must be called outside lock
        private void NotifyUpdatedSections(IEnumerable <string> sectionsToNotify)
        {
            foreach (string sectionName in sectionsToNotify)
            {
                ConfigurationChangedEventHandler callbacks = (ConfigurationChangedEventHandler)eventHandlers[sectionName];
                if (callbacks == null)
                {
                    continue;
                }

                ConfigurationSqlChangedEventArgs eventData = new ConfigurationSqlChangedEventArgs(this.data.ConnectionString, this.data.GetStoredProcedure, sectionName);
                try
                {
                    foreach (ConfigurationChangedEventHandler callback in callbacks.GetInvocationList())
                    {
                        if (callback != null)
                        {
                            callback(this, eventData);
                        }
                    }
                }
                catch                // (Exception e)
                {
                    //EventLog.WriteEntry(GetEventSourceName(), Resources.ExceptionEventRaisingFailed + GetType().FullName + " :" + e.Message);
                }
            }
        }
        // must be called outside lock
        private void NotifyUpdatedSections(IEnumerable<string> sectionsToNotify)
        {
            foreach (string sectionName in sectionsToNotify)
            {
                ConfigurationChangedEventHandler callbacks = (ConfigurationChangedEventHandler)eventHandlers[sectionName];
                if (callbacks == null)
                {
                    continue;
                }

                ConfigurationSqlChangedEventArgs eventData = new ConfigurationSqlChangedEventArgs(this.data.ConnectionString,this.data.GetStoredProcedure,sectionName);
                try
                {
                    foreach (ConfigurationChangedEventHandler callback in callbacks.GetInvocationList())
                    {
                        if (callback != null)
                        {
                            callback(this, eventData);
                        }
                    }
                }
                catch// (Exception e)
                {
                    //EventLog.WriteEntry(GetEventSourceName(), Resources.ExceptionEventRaisingFailed + GetType().FullName + " :" + e.Message);
                }
            }
        }