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