public void ConnectionFailedHandler(object sender, ConnectionFailedEventArgs e)
 {
     connectionDataArgs = e;
 }
		public void ConnectionFailed(object sender, ConnectionFailedEventArgs e)
		{
			if (PerformanceCountersEnabled) connectionFailedCounter.Increment();
			if (WmiEnabled) FireManagementInstrumentation(new ConnectionFailedEvent(instanceName, e.ConnectionString, e.Exception.ToString()));
			if (EventLoggingEnabled)
			{
				string errorMessage
					= string.Format(
						Resources.Culture,
						Resources.ErrorConnectionFailedMessage,
						instanceName);
				string extraInformation
					= string.Format(
						Resources.Culture,
						Resources.ErrorConnectionFailedExtraInformation,
						e.ConnectionString);
				string entryText = new EventLogEntryFormatter(Resources.BlockName).GetEntryText(errorMessage, e.Exception, extraInformation);

				EventLog.WriteEntry(GetEventSourceName(), entryText, EventLogEntryType.Error);
			}
		}