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(); } }
public void Dispose() { MessagePumpCancellation.Cancel(); Mailbox.Complete(); }