Ejemplo n.º 1
0
 public SSHRemoteShell(UnixSystem remoteSystem)
 {
     _shell = new StreamingShell(remoteSystem);
     _shell.OutputReceived += OnOutputReceived;
     _shell.Closed         += OnClosedOrDisconnected;
     _shell.Disconnected   += OnClosedOrDisconnected;
     _shell.ErrorOccured   += OnError;
 }
Ejemplo n.º 2
0
        public void Dispose()
        {
            if (_shell != null)
            {
                _shell.OutputReceived -= OnOutputReceived;
                _shell.Closed         -= OnClosedOrDisconnected;
                _shell.Disconnected   -= OnClosedOrDisconnected;
                _shell.ErrorOccured   -= OnError;

                _shell.Dispose();
                _shell = null;
            }
        }