コード例 #1
0
        public async ValueTask DisposeAsync()
        {
            await _lock.DisposeAsync();

            _requestResponseHandler.Dispose();
            _channelManager.Dispose();
            await _stream.DisposeAsync();
        }
コード例 #2
0
        public async ValueTask DisposeAsync()
        {
            if (Interlocked.Exchange(ref _isDisposed, 1) != 0)
            {
                return;
            }

            await _lock.DisposeAsync().ConfigureAwait(false);

            _channelManager.Dispose();
            await _stream.DisposeAsync().ConfigureAwait(false);
        }