コード例 #1
0
 /// <summary>
 /// Will execute a DOS command using cmd.exe on remote server with provided options.
 /// </summary>
 /// <param name="cmd"></param>
 /// <param name="runCmdOptions"></param>
 /// <returns></returns>
 public static IOfferRemoteExecution DosCommand(this IOfferRemoteExecution execute, string cmd, Action<IOfferRunCmdOptions> runCmdOptions)
 {
     var options = new RunCmdOptions();
     runCmdOptions(options);
     var runCmdOperation = new RunCmdPsOperation(cmd, options.Values);
     Configure.Operation(execute, runCmdOperation);
     return execute;
 }
コード例 #2
0
 /// <summary>
 /// Will execute a DOS command using cmd.exe on remote server.
 /// </summary>
 /// <param name="cmd"></param>
 /// <returns></returns>
 public static IOfferRemoteExecution DosCommand(this IOfferRemoteExecution execute, string cmd)
 {
     var runCmdOperation = new RunCmdPsOperation(cmd);
     Configure.Operation(execute, runCmdOperation);
     return execute;
 }