Пример #1
0
        void DisposeMessageHandling()
        {
            if (messagingClient != null)
            {
                messagingClient.Dispose();
                messagingClient = null;
            }

            if (messageTransport != null)
            {
                messageTransport.Dispose();
                messageTransport = null;
            }
        }
Пример #2
0
 public void Dispose()
 {
     _cts?.Cancel();
     _receiveTask?.Wait();
     _transport?.Dispose();
 }