/// <summary/>
 /// <param name="eventLogIDs"/>
 /// <exclude/>
 protected ExceptionHandlingFailureEvent(EventLogIdentifier[] eventLogIDs)
     : base(null, eventLogIDs)
 {
     this.exception = null;
     this.exceptionMessage = string.Empty;
     this.message = string.Empty;
 }
Exemplo n.º 2
0
 /// <summary/>
 /// <param name="eventLogIdentifiers"/>
 /// <exclude/>
 protected CachingServiceFailureEvent(EventLogIdentifier[] eventLogIdentifiers)
     : base(null, eventLogIdentifiers)
 {
     reportedException = null;
     reportedExceptionMessage = string.Empty;
     eventMessage = string.Empty;
 }
Exemplo n.º 3
0
 /// <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);
 }
Exemplo n.º 4
0
 private DataConnectionFailedEvent(string[] counterNames, EventLogIdentifier[] eventLogIDs)
     : base(counterNames, eventLogIDs)
 {
 }
 private CachingServiceInternalFailureEvent(EventLogIdentifier[] eventLogIDs)
     : base(eventLogIDs)
 {
     reportedException = null;
 }
Exemplo n.º 6
0
 /// <summary/>
 /// <param name="counterNames"/>
 /// <param name="eventLogIDs"/>
 /// <exclude/>
 protected SecurityCryptoServiceEvent(string[] counterNames, EventLogIdentifier[] eventLogIDs)
 {
     this.eventMessage = string.Empty;
     this.internalEvent = new InstrumentedEvent(
         SR.InstrumentationCounterCategory,
         counterNames,
         true,
         SR.InstrumentationEventSource,
         eventLogIDs);
 }
Exemplo n.º 7
0
 /// <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);
 }
Exemplo n.º 8
0
 private LoggingDistributorEvent(EventLogIdentifier[] eventLogIDs)
     : base(null, eventLogIDs)
 {
 }
Exemplo n.º 9
0
 /// <summary/>
 /// <param name="counterCategory"/>
 /// <param name="counterNames"/>
 /// <param name="createNewInstance"/>
 /// <param name="eventLogSource"/>
 /// <param name="eventIds"/>
 /// <exclude/>
 /// <devdoc>
 /// This constructor create a object that represents an instrumented event.
 /// When this event is fired, it increments all its performance counter instances
 /// and write to event log for all its event id.
 /// </devdoc>        
 public InstrumentedEvent(string counterCategory, string[] counterNames, bool createNewInstance, string eventLogSource, EventLogIdentifier[] eventIds)
 {
     Initialize(counterCategory, counterNames, createNewInstance, eventLogSource, eventIds);
 }
Exemplo n.º 10
0
        /// <devdoc>
        /// This method initializes the internal performance counters and event loggers.
        /// </devdoc>
        private void Initialize(string counterCategory, string[] counterNames, bool createNewInstance, string eventLogSource, EventLogIdentifier[] eventIds)
        {
            this.eventLoggers = new EventLogger[0];
            this.perfCounters = new PerformanceCounterInstances[0];

            if (eventLogSource != null && eventIds != null)
            {
                AddEventLogger(eventLogSource, eventIds);
            }

            if (counterCategory != null && counterNames != null)
            {
                AddPerformanceCounter(counterCategory, counterNames, createNewInstance);
            }
        }
Exemplo n.º 11
0
 private void AddEventLogger(string source, EventLogIdentifier[] eventIds)
 {
     int count = eventIds.Length;
     if (count <= 0)
     {
         return;
     }
     this.eventLoggers = new EventLogger[count];
     for (int i = 0; i < count; i++)
     {
         EventLogger logger = new EventLogger(source, eventIds[i].LogType, eventIds[i].EventId);
         this.eventLoggers[i] = logger;
     }
 }
Exemplo n.º 12
0
 /// <summary/>
 /// <param name="eventLogIDs"/>
 /// <exclude/>
 protected DataServiceFailureEvent(EventLogIdentifier[] eventLogIDs)
     : base(null, eventLogIDs)
 {
     this.exceptionMessage = string.Empty;
 }
Exemplo n.º 13
0
 /// <summary/>
 /// <exclude/>
 protected CachingServiceEvent(string[] counterNames, EventLogIdentifier[] eventLogIdentifiers)
     : this()
 {
     internalEvent = new InstrumentedEvent(
         SR.CachingInstrumentationCounterCategory,
         counterNames,
         true,
         SR.CachingInstrumentationEventSource,
         eventLogIdentifiers);
 }
 private ExceptionHandlingConfigFailureEvent(EventLogIdentifier[] eventLogIDs)
     : base(eventLogIDs)
 {
     // Do Nothing
 }
Exemplo n.º 15
0
 /// <summary>
 /// Create a new instance of the event.
 /// </summary>
 /// <param name="eventLogIDs">Array of <see cref="EventLogIdentifier"></see>s used to initialize this base event</param>
 protected LoggingServiceFailureEvent(EventLogIdentifier[] eventLogIDs)
     : base(null, eventLogIDs)
 {
     failureException = null;
     failureExceptionMessage = string.Empty;
 }
 private DataServiceConfigFailureEvent(EventLogIdentifier[] eventLogIDs)
     : base(eventLogIDs)
 {
     this.failedConfigurationFile = string.Empty;
 }