private void FireEvent(string message, Exception ex) { string errorMsg; writerLock.AcquireWriterLock(-1); try { SetMessage(message); SetException(ex); SetExceptionMessage(string.Empty); errorMsg = ExceptionMessage; InstrumentedEvent.FireWmiEvent(this); // fire WMI event } finally { writerLock.ReleaseWriterLock(); } if (ex == null) { FireAuxEvent(message); } else { FireAuxEvent(message + SR.ExceptionString + errorMsg); } }
/// <devdoc> /// Creates a new ExceptionHandlingEvent object and instantiates an internal event /// with the specified counter names. /// </devdoc> /// <summary/> /// <param name="counterNames"/> /// <exclude/> protected ExceptionHandlingEvent(string[] counterNames) { InternalEvent = new InstrumentedEvent( ExceptionHandledEvent.InstrumentationCounterCategory, counterNames, true); }
/// <summary/> /// <param name="counterNames"/> /// <exclude/> /// <devdoc> /// Factory method to create a new InstrumentedEvent based on the counterNames /// </devdoc> protected CachingServiceEvent(string[] counterNames) : this() { internalEvent = new InstrumentedEvent( SR.CachingInstrumentationCounterCategory, counterNames, true); }
/// <summary> /// Constructor with performance counter names only. /// </summary> /// <param name="counterNames">Array of names of performance counters defined for Logging</param> protected LoggingServiceEvent(string[] counterNames) { this.eventMessage = string.Empty; this.internalEvent = new InstrumentedEvent( SR.InstrumentationCounterCategory, counterNames, true); }
/// <summary/> /// <param name="connectionString"/> /// <exclude/> protected void FireEvent(string connectionString) { lock (lockObj) { Message = SR.MessageDataConnectionOpened(connectionString); InstrumentedEvent.FireWmiEvent(this); } FireAuxEvent(Message); }
/// <devdoc> /// Creates a new ExceptionHandlingEvent object and instantiates an internal event /// with the specified counter names and event log ID's. /// </devdoc> /// <summary/> /// <param name="counterNames"/> /// <param name="eventLogIDs"/> /// <exclude/> protected ExceptionHandlingEvent(string[] counterNames, EventLogIdentifier[] eventLogIDs) { InternalEvent = new InstrumentedEvent( ExceptionHandledEvent.InstrumentationCounterCategory, counterNames, true, EventSourceName, eventLogIDs); }
/// <summary/> /// <exclude/> protected CachingServiceEvent(string[] counterNames, EventLogIdentifier[] eventLogIdentifiers) : this() { internalEvent = new InstrumentedEvent( SR.CachingInstrumentationCounterCategory, counterNames, true, SR.CachingInstrumentationEventSource, eventLogIdentifiers); }
/// <summary/> /// <param name="connectionString"/> /// <exclude/> private void FireEvent(string connectionString) { lock (lockObj) { Message = SR.MessageConnection(connectionString); InstrumentedEvent.FireWmiEvent(this); } FireAuxEvent(string.Empty); }
/// <summary/> /// <param name="connectionString"/> /// <exclude/> protected void FireEvent(string connectionString) { Message = SR.ExceptionMessageDatabaseConnectionFailed(connectionString); lock (lockObj) { InstrumentedEvent.FireWmiEvent(this); } FireAuxEvent(Message); }
private void FireEvent(long itemRemoved, long sizeLimit, int scavengingRange) { lock (lockObj) { this.itemRemoved = itemRemoved; this.sizeLimit = sizeLimit; this.scavengingRange = scavengingRange; InstrumentedEvent.FireWmiEvent(this); } }
/// <summary/> /// <param name="message"/> /// <exclude/> protected void FireEvent(string message) { lock (lockObj) { eventMessage = message; InstrumentedEvent.FireWmiEvent(this); } FireAuxEvent(string.Empty); }
/// <summary> /// Constructor with performance counter names and event log Ids. /// </summary> /// <param name="counterNames">Array of names of performance counters defined for Logging</param> /// <param name="eventLogIDs">Array of <see cref="EventLogIdentifier"></see>s</param> protected LoggingServiceEvent(string[] counterNames, EventLogIdentifier[] eventLogIDs) { this.eventMessage = string.Empty; this.internalEvent = new InstrumentedEvent( SR.InstrumentationCounterCategory, counterNames, true, SR.InstrumentationEventSource, eventLogIDs); }
private void FireEvent(string message, Exception ex) { lock (lockObj) { base.eventMessage = message; reportedException = ex; reportedExceptionMessage = string.Empty; InstrumentedEvent.FireWmiEvent(this); } FireAuxEvent(message + " Exception: " + ExceptionMessage); }
private void FireEvent(string commandText, string connectionString) { lock (lockObj) { Message = SR.ExceptionMessageDatabaseCommandFailed(connectionString); this.commandText = commandText; InstrumentedEvent.FireWmiEvent(this); } FireAuxEvent(string.Empty); }
private CachingServiceItemTurnoverEvent(string[] counterNames) { InstrumentedEvent internalEvent; internalEvent = new InstrumentedEvent(SR.CachingInstrumentationCounterCategory, counterNames, true); turnOverInstances = internalEvent.GetPerformanceCounterInstances(SR.PerfCounterCacheTurnoverRate); totalEntriesInstances = internalEvent.GetPerformanceCounterInstances(SR.PerfCounterTotalCacheEntries); }
private void FireEvent(string message, Exception ex, string failedConfigurationFile) { lock (lockObj) { Message = message; this.failedConfigurationFile = failedConfigurationFile; Exception = ex; ExceptionMessage = string.Empty; InstrumentedEvent.FireWmiEvent(this); } FireAuxEvent(SR.ExceptionMessageConfigurationLoadFailed(failedConfigurationFile, ExceptionMessage)); }
private SecurityCacheReadEvent(string[] counterNames) { internalEvent = new InstrumentedEvent( SR.InstrumentationCounterCategory, counterNames, true); perfCounters = new PerformanceCounterInstances[] { internalEvent.GetPerformanceCounterInstances(SecurityServiceEvent.Counters[(int)SecurityServiceEvent.CounterID.CacheHits].CounterName), internalEvent.GetPerformanceCounterInstances(SecurityServiceEvent.Counters[(int)SecurityServiceEvent.CounterID.CacheMisses].CounterName), internalEvent.GetPerformanceCounterInstances(SecurityServiceEvent.Counters[(int)SecurityServiceEvent.CounterID.TotalCacheReads].CounterName), internalEvent.GetPerformanceCounterInstances(SecurityServiceEvent.Counters[(int)SecurityServiceEvent.CounterID.CacheHitRatio].CounterName) }; }
private CachingServiceItemReadEvent(string[] counterNames) { internalEvent = new InstrumentedEvent( SR.CachingInstrumentationCounterCategory, counterNames, true); perfCounters = new PerformanceCounterInstances[] { internalEvent.GetPerformanceCounterInstances(SR.PerfCounterCacheHitsSec), internalEvent.GetPerformanceCounterInstances(SR.PerfCounterCacheMissesSec), internalEvent.GetPerformanceCounterInstances(SR.PerfCounterCacheAccessAttempts), internalEvent.GetPerformanceCounterInstances(SR.PerfCounterCacheHitRatio) }; }
private void FireEvent(string message, Exception ex) { lock (lockObj) { Message = message; Exception = ex; ExceptionMessage = string.Empty; InstrumentedEvent.FireWmiEvent(this); } FireAuxEvent(string.Concat(message, SR.ExceptionMsg, ExceptionMessage)); }
private void FireEvent(string message, Exception ex) { lock (lockObj) { Message = message; failedConfigurationFile = AppDomain.CurrentDomain.SetupInformation.ConfigurationFile; Exception = ex; ExceptionMessage = string.Empty; InstrumentedEvent.FireWmiEvent(this); } FireAuxEvent(string.Concat(message, SR.ExceptionMsg, ExceptionMessage)); }
private void FireEvent(string message, bool started) { writerLock.AcquireWriterLock(LockTimeout); try { this.startedFlag = started; this.eventMessage = message; InstrumentedEvent.FireWmiEvent(this); } finally { writerLock.ReleaseWriterLock(); } }
/// <summary/> /// <param name="message"/> /// <exclude/> protected void FireEvent(string message) { writerLock.AcquireWriterLock(LockTimeout); try { eventMessage = message; InstrumentedEvent.FireWmiEvent(this); } finally { writerLock.ReleaseWriterLock(); } FireAuxEvent(string.Empty); }
private void FireEvent(string message, Exception ex) { writerLock.AcquireWriterLock(LockTimeout); try { eventMessage = message; failureException = ex; failureExceptionMessage = string.Empty; InstrumentedEvent.FireWmiEvent(this); } finally { writerLock.ReleaseWriterLock(); } }
/// <summary/> /// <param name="counterNames"/> /// <exclude/> protected DataServiceEvent(string[] counterNames) { Message = string.Empty; InternalEvent = new InstrumentedEvent(SR.CounterCategory, counterNames, true); }
/// <summary> /// Default constructor. /// </summary> protected LoggingServiceEvent() { this.eventMessage = string.Empty; this.internalEvent = null; }
/// <summary/> /// <param name="counterNames"/> /// <param name="eventLogIds"/> /// <exclude/> protected DataServiceEvent(string[] counterNames, EventLogIdentifier[] eventLogIds) { Message = string.Empty; InternalEvent = new InstrumentedEvent(SR.CounterCategory, counterNames, true, SR.EventSource, eventLogIds); }
private void FireEventCore() { InstrumentedEvent.FireWmiEvent(this); }
/// <summary/> /// <exclude/> protected CachingServiceEvent() { eventMessage = string.Empty; internalEvent = null; }
/// <summary/> /// <exclude/> protected SecurityCryptoServiceEvent() { this.eventMessage = string.Empty; this.internalEvent = null; }