Example #1
0
 private void HandleErrorsOnDataSink(DataReceiverRegistrationKey key, Exception e)
 {
     this.TraceData(TraceEventType.Error, Resources.Error_SinkThrewUncaughtException, key, e);
     // TODO: Strategies for sinks that cause exceptions.
 }
Example #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 RegisterDataReceiverSink(IDataReceiverSink sink)
 {
     if (sink == null) throw new ArgumentNullException("sink");
     DataReceiverRegistrationKey key = new DataReceiverRegistrationKey(this, sink);
     Util.LazyInitializeWithLock(ref _dataNotifier, _notifierLock)
         .AddRegistration(key);
     return key;
 }