Ejemplo n.º 1
0
 private void HandleErrorsOnEventSink(EventRegistrationKey key, Exception e)
 {
     this.TraceData(TraceEventType.Error, Resources.Error_SinkThrewUncaughtException, key, e);
     // TODO: Strategies for sinks that cause exceptions.
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Registers an event sink with the listener without activating the
 /// event sink.
 /// </summary>
 /// <param name="sink">the event sink to register</param>
 /// <returns>A registration key for the event sink</returns>		
 public ISinkRegistrationKey RegisterEventSink(IEventSink sink)
 {
     if (sink == null) throw new ArgumentNullException("sink");
     EventRegistrationKey key = new EventRegistrationKey(this, sink);
     Util.LazyInitializeWithLock(ref _eventNotifier, _notifierLock)
         .AddRegistration(key);
     return key;
 }