Renci.SshNet.SshCommand.CancelAsync C# (CSharp) Method

CancelAsync() public method

Cancels command execution in asynchronous scenarios.
public CancelAsync ( ) : void
return void
        public void CancelAsync()
        {
            if (_channel != null && _channel.IsOpen && _asyncResult != null)
            {
                // TODO: check with Oleg if we shouldn't dispose the channel and uninitialize it ?
                _channel.Dispose();
            }
        }

Usage Example

Exemplo n.º 1
0
 /// <summary>
 /// Cancels command execution in asynchronous scenarios.
 /// </summary>
 public void CancelAsync()
 {
     _sshCommand.CancelAsync();
 }