Exemplo n.º 1
0
 public void Dispose()
 {
     if (_stream != null)
     {
         _stream.Dispose();
         _stream = null;
     }
     if (_consoleWriter != null)
     {
         _consoleWriter.Dispose();
         _consoleWriter = null;
     }
     if (_errorWriter != null)
     {
         _errorWriter.Dispose();
         _errorWriter = null;
     }
 }
Exemplo n.º 2
0
 public void Dispose()
 {
     if (session != null)
     {
         (session as IDisposable)?.Dispose();
         session = null;
     }
     if (_consoleWriter != null)
     {
         _consoleWriter.Dispose();
         _consoleWriter = null;
     }
     if (_errorWriter != null)
     {
         _errorWriter.Dispose();
         _errorWriter = null;
     }
     if (_instream != null)
     {
         _instream.Dispose();
         _instream = null;
     }
 }