コード例 #1
0
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         _inputStream?.Close();
         _inputStream?.Dispose();
         _inputStream = null;
         _streamSubject?.Dispose();
         _streamSubject = null;
         IsOpen         = false;
     }
 }
コード例 #2
0
        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);
        }