示例#1
0
 public int ExecuteCommand(string command, bool showWindow)
 {
     try
     {
         return(_shell.ExecuteCommand(command, showWindow));
     }
     catch (Exception e)
     {
         throw new RemoteNodeException(_machine, e);
     }
 }
示例#2
0
        public int ExecuteCommand(string cmd, string operationName = null, bool showWindow = false)
        {
            Log.InfoFormat("Executing command '{0}'...", cmd);
            var operation = _operationTracker.BeginExecuteCommand(cmd, operationName);

            try
            {
                var exitCode = _shell.ExecuteCommand(cmd, showWindow);
                operation.Success();
                return(exitCode);
            }
            catch (Exception e)
            {
                operation.Failed(e);
                throw;
            }
        }