protected override void Dispose(bool disposing) { if (disposing) { _inputStream?.Close(); _inputStream?.Dispose(); _inputStream = null; _streamSubject?.Dispose(); _streamSubject = null; IsOpen = false; } }
protected override void Dispose(bool disposing) { if (_inputStream is object) { _inputStream.Close(); _inputStream.Dispose(); _inputStream = null; } if (_outputStream is object) { _outputStream.Close(); _outputStream.Unschedule(NSRunLoop.Current, NSRunLoop.NSDefaultRunLoopMode); _outputStream.Dispose(); _outputStream = null; } base.Dispose(disposing); }