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

SshCommand() private method

Initializes a new instance of the SshCommand class.
Either , is null.
private SshCommand ( ISession session, string commandText, Encoding encoding ) : System
session ISession The session.
commandText string The command text.
encoding System.Text.Encoding The encoding to use for the results.
return System
        internal SshCommand(ISession session, string commandText, Encoding encoding)
        {
            if (session == null)
                throw new ArgumentNullException("session");
            if (commandText == null)
                throw new ArgumentNullException("commandText");
            if (encoding == null)
                throw new ArgumentNullException("encoding");

            _session = session;
            CommandText = commandText;
            _encoding = encoding;
            CommandTimeout = Session.InfiniteTimeSpan;
            _sessionErrorOccuredWaitHandle = new AutoResetEvent(false);

            _session.Disconnected += Session_Disconnected;
            _session.ErrorOccured += Session_ErrorOccured;
        }