public void Dispose()
        {
            if (_isDisposed)
            {
                return;
            }

            _transceiver.OnMessageReceived -= TransceiverOnMessageReceived;
            _transceiver.Dispose();

            _positionProvider.Dispose();

            _isDisposed = true;
        }
Example #2
0
        public void Dispose()
        {
            _underlying.Dispose();

            if (SslStream != null)
            {
                SslStream.Dispose();
                try
                {
                    _writeStream !.Dispose();
                }
                catch (Exception)
                {
                    // Ignore: the buffer flush which will fail since the underlying transport is closed.
                }
            }
        }
Example #3
0
 public void Dispose()
 {
     _cache.Dispose();
     _transceiver.Dispose();
 }