BeginExecute() public method

Begins an asynchronous command execution.
Asynchronous operation is already in progress. Invalid operation. CommandText property is empty. Client is not connected. Operation has timed out. Asynchronous operation is already in progress. CommandText property is empty.
public BeginExecute ( ) : IAsyncResult
return IAsyncResult
コード例 #1
0
		private void BeginService()
		{
			_client = new SshClient(Host, UserName, Password);
			_client.Connect();
            _client.RunCommand("sudo pkill mono");
			var call = string.Format("cd {0}", _homePiBuildindicatronServer);
			const string commandText = "sudo mono BuildIndicatron.Server.exe";
			var text = call + " && " + commandText;
			_log.Info("Starting command:" + text);
			_runCommand = _client.CreateCommand(text);
			_beginExecute = _runCommand.BeginExecute();
			streamReader = new StreamReader(_runCommand.OutputStream);
			WaitFor("Running", 6000).Wait();
		}
コード例 #2
0
ファイル: SshCommand.cs プロジェクト: waffle-iron/nequeo
 /// <summary>
 /// Begins an asynchronous command execution.
 /// </summary>
 /// <returns>
 /// An <see cref="System.IAsyncResult" /> that represents the asynchronous command execution, which could still be pending.
 /// </returns>
 public IAsyncResult BeginExecute()
 {
     return(_sshCommand.BeginExecute());
 }