Example #1
0
 /// <summary>
 /// Creates a copy of this command, setting the standard input pipe to the specified source.
 /// </summary>
 public Command WithStandardInputPipe(PipeSource source) => new Command(
     TargetFilePath,
     Arguments,
     WorkingDirPath,
     EnvironmentVariables,
     Validation,
     source,
     StandardOutputPipe,
     StandardErrorPipe);
Example #2
0
 /// <summary>
 /// Initializes an instance of <see cref="Command"/>.
 /// </summary>
 public Command(
     string targetFilePath,
     string arguments,
     string workingDirPath,
     IReadOnlyDictionary <string, string> environmentVariables,
     CommandResultValidation validation,
     PipeSource standardInputPipe,
     PipeTarget standardOutputPipe,
     PipeTarget standardErrorPipe)
 {
     TargetFilePath       = targetFilePath;
     Arguments            = arguments;
     WorkingDirPath       = workingDirPath;
     EnvironmentVariables = environmentVariables;
     Validation           = validation;
     StandardInputPipe    = standardInputPipe;
     StandardOutputPipe   = standardOutputPipe;
     StandardErrorPipe    = standardErrorPipe;
 }