public void Dispose() { if (_isDisposed) { return; } _simulatedIpc.Dispose(); Connection.Dispose(); GC.SuppressFinalize(this); _isDisposed = true; }
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; }