コード例 #1
0
            public void Dispose()
            {
                if (_isDisposed)
                {
                    return;
                }

                _simulatedIpc.Dispose();
                Connection.Dispose();

                GC.SuppressFinalize(this);

                _isDisposed = true;
            }
コード例 #2
0
            public void Dispose()
            {
                if (_isDisposed)
                {
                    return;
                }

                using (_combinedCancellationTokenSource)
                {
                    _combinedCancellationTokenSource.Cancel();

                    LocalToRemoteConnection.Dispose();
                    RemoteToLocalConnection.Dispose();
                    _simulatedIpc.Dispose();

                    // Other IDisposable fields should be disposed by the connections.
                }

                _isDisposed = true;
            }