예제 #1
0
 public void Dispose()
 {
     MessagePumpCancellation.Cancel();
     MessagePumpCancellation.Dispose();
     Timer.Change(Timeout.Infinite, Timeout.Infinite);
     Timer.Dispose();
     Mailbox.Complete();
     if (MessagePump.IsCanceled || MessagePump.IsFaulted || MessagePump.IsCompleted)
     {
         MessagePump.Dispose();
     }
 }
예제 #2
0
 public void Dispose()
 {
     MessagePumpCancellation.Cancel();
     Mailbox.Complete();
 }