/// <summary>
		/// <para>Raises the <see cref="ConfigurationChanged"/> event.</para>
		/// </summary>
		public virtual void OnConfigurationChanged()
		{
			try
			{
				ChoConfigurationChangedEventArgs eventData = EventData;
				OrderedDictionary eventHandlerList = _eventHandlerList;
				if (eventHandlerList != null)
				{
					lock (_eventHandlerListLock)
					{
						//int counter = 0;
						//WaitHandle[] handles = new WaitHandle[_eventHandlerList.Count];
						foreach (ChoConfigurationChangedEventHandler callback in eventHandlerList.Values)
						{
							if (callback != null)
							{
								callback(this, eventData);

								//handles[counter++] = callback.BeginInvoke(this, eventData, null, null).AsyncWaitHandle;
							}
						}
						//WaitHandle.WaitAll(handles);
					}
				}
			}
			catch (ChoFatalApplicationException)
			{
			}
			catch (Exception ex)
			{
				ChoTrace.Write(ex);
			}
		}
 private void OnConfigurationChanged(object sender, ChoConfigurationChangedEventArgs e)
 {
     this.LastLoadedTimeStamp = e.LastUpdatedTimeStamp;
     Refresh();
 }
示例#3
0
 private static void _systemConfigurationChangeWatcher_ConfigurationChanged(object sender, ChoConfigurationChangedEventArgs e)
 {
     ChoQueuedExecutionService.Global.Enqueue(() =>
     {
         ChoAppDomain.Refresh();
         OpenExeConfiguration(false);
     }
                                              );
 }
示例#4
0
 private static void _configurationChangeWatcher_ConfigurationChanged(object sender, ChoConfigurationChangedEventArgs e)
 {
     //OpenExeConfiguration(false);
     ChoQueuedExecutionService.Global.Enqueue(() => OpenExeConfiguration(false));
 }
 private static void NullConfigurationChangedEventHandler(object sender, ChoConfigurationChangedEventArgs e)
 {
 }
 static void _configurationChangeWatcher_ConfigurationChanged(object sender, ChoConfigurationChangedEventArgs e)
 {
     _appXmlDocument            = new ChoXmlDocument(AppConfigFilePath, false, true);
     _appIncludeConfigFilePaths = _appXmlDocument.IncludeFiles;
 }