Exemplo n.º 1
0
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         ReadStream.Dispose();
         WriteStream.Dispose();
     }
     base.Dispose(disposing);
 }
        public void Close()
        {
            if (ReadStream != null)
            {
                ReadStream.Dispose();
            }

            _client.CancelPendingRequests();
        }
Exemplo n.º 3
0
            public void Dispose()
            {
                if (!_isDisposed)
                {
                    _certificate?.Dispose();
                    _directory?.Dispose();
                    ReadStream.Dispose();
                    WriteStream.Dispose();

                    GC.SuppressFinalize(this);

                    _isDisposed = true;
                }
            }
Exemplo n.º 4
0
 protected override void Dispose(bool disposing)
 {
     if (disposing && !leaveOpen)
     {
         try
         {
             ReadStream.Dispose();
         }
         finally
         {
             WriteStream.Dispose();
         }
     }
 }
Exemplo n.º 5
0
 protected virtual void Dispose(bool disposing)
 {
     if (_disposed)
     {
         return;
     }
     if (disposing)
     {
         ReadStream.Dispose();
         WriteStream.Dispose();
     }
     File.Delete(Path);
     _disposed = true;
 }
Exemplo n.º 6
0
        protected virtual void Dispose(bool disposing)
        {
            if (disposed)
            {
                return;
            }

            if (disposing)
            {
                ReadStream.Dispose();
                WriteStream.Dispose();
            }

            System.IO.File.Delete(path);

            disposed = true;
        }
Exemplo n.º 7
0
 public virtual void Dispose()
 {
     _tokenSource.Cancel();
     _tokenSource.Dispose();
     if (ReadStream != null)
     {
         ReadStream.Dispose();
     }
     if (WriteStream != null)
     {
         WriteStream.Dispose();
     }
     if (Socket != null)
     {
         Socket.Dispose();
     }
 }
Exemplo n.º 8
0
        public virtual void Close()
        {
            if (ReadStream != null)
            {
                ReadStream.Flush();
                ReadStream.Dispose();
            }
            if (WriteStream != null)
            {
                WriteStream.Flush();
                WriteStream.Dispose();
            }

            if (Socket != null)
            {
                Socket.Dispose();
            }
        }
 public void Dispose()
 {
     ReadStream?.Dispose();
     WriteStream?.Dispose();
 }
Exemplo n.º 10
0
 public void Dispose()
 {
     ReadStream.Dispose();
     WriteStream.Dispose();
     Connected = false;
 }
Exemplo n.º 11
0
 public void Dispose()
 {
     ReadStream.Dispose();
     WriteStream.Dispose();
     Disposed = true;
 }
Exemplo n.º 12
0
 public override void Dispose()
 {
     ReadStream?.Dispose();
     fileStream?.Dispose();
 }
Exemplo n.º 13
0
 public void SetReadStream(Stream stream, bool canDispose = true)
 {
     ReadStream?.Dispose();
     ReadStream = new EncryptedStream(stream, canDispose);
 }
Exemplo n.º 14
0
 public void Dispose()
 {
     ReadStream.Dispose();
 }