public void CyptographicOperationFailed(object sender, CrytographicOperationErrorEventArgs e)
		{
			if (EventLoggingEnabled)
			{
				string errorMessage
					= string.Format(
						Resources.Culture,
						Resources.ErrorCryptographicOperationFailed,
						instanceName);
				string entryText = new EventLogEntryFormatter(Resources.BlockName).GetEntryText(errorMessage, e.Exception, e.Message);

				EventLog.WriteEntry(GetEventSourceName(), entryText, EventLogEntryType.Error);
			}
			if (WmiEnabled) FireManagementInstrumentation(new SymmetricOperationFailedEvent(instanceName, e.Message, e.Exception.ToString()));
		}
コード例 #2
0
        public void CyptographicOperationFailed(object sender, CrytographicOperationErrorEventArgs e)
        {
            if (EventLoggingEnabled)
            {
                string errorMessage
                    = string.Format(
                          Resources.Culture,
                          Resources.ErrorCryptographicOperationFailed,
                          instanceName);
                string entryText = new EventLogEntryFormatter(Resources.BlockName).GetEntryText(errorMessage, e.Exception, e.Message);

                EventLog.WriteEntry(GetEventSourceName(), entryText, EventLogEntryType.Error);
            }
            if (WmiEnabled)
            {
                ManagementInstrumentation.Fire(new HashOperationFailedEvent(instanceName, e.Message, e.Exception.ToString()));
            }
        }