public void Dispose()
 {
     if (_ExitedNormally && _Connection != null && _Target != null)
     {
         _Target.ReturnConnectionToPool(_Connection);
         _Target     = null;
         _Connection = null;
     }
 }
            public TelnetCommand(TelnetTarget telnetTarget, TelnetConnection telnetConnection, string commandLine)
            {
                _Target      = telnetTarget;
                _Connection  = telnetConnection;
                _CommandLine = commandLine;

                //We will use the markers below to determine where the output of our command starts and ends
                _BeginMarker = $"---com.sysprogs.telnet.begin.{Guid.NewGuid()}---";
                _EndMarker   = $"[email protected].{Guid.NewGuid()}---";
                _ReadThread  = new Thread(ReadThreadBody);
            }
 public TelnetConsole(TelnetTarget telnetTarget, TelnetConnection telnetConnection, string path)
     : base(telnetTarget, telnetConnection, null)
 {
     Path = path;
 }