示例#1
0
 private void RaiseStopped(Exception exception)
 {
     if (Stopped != null)
     {
         var e = new RecordingStoppedEventArgs(exception);
         if (_synchronizationContext != null)
         {
             _synchronizationContext.Post(o => Stopped(this, e), null); //use post instead of send to avoid deadlocks
         }
         else
         {
             Stopped(this, e);
         }
     }
 }
示例#2
0
        private void RaiseStopped(Exception exception)
        {
            EventHandler <RecordingStoppedEventArgs> handler = this.Stopped;

            if (handler != null)
            {
                var e = new RecordingStoppedEventArgs(exception);
                if (_synchronizationContext != null)
                {
                    _synchronizationContext.Post(o => handler(this, e), null); //use post instead of send to avoid deadlocks
                }
                else
                {
                    handler(this, e);
                }
            }
        }
示例#3
0
 private void RaiseStopped(Exception exception)
 {
     if (Stopped != null)
     {
         var e = new RecordingStoppedEventArgs(exception);
         if(_synchronizationContext != null)
             _synchronizationContext.Post(o => Stopped(this, e), null); //use post instead of send to avoid deadlocks
         else
             Stopped(this, e);
     }
 }
示例#4
0
 private void RaiseStopped(Exception exception)
 {
     EventHandler<RecordingStoppedEventArgs> handler = this.Stopped;
     if (handler != null)
     {
         var e = new RecordingStoppedEventArgs(exception);
         if(_synchronizationContext != null)
             _synchronizationContext.Post(o => handler(this, e), null); //use post instead of send to avoid deadlocks
         else
             handler(this, e);
     }
 }