Class ProcessLauncherExtensions
Extension methods for IProcessLauncher.
public static class ProcessLauncherExtensions- Inheritance
- 
      objectProcessLauncherExtensions
Methods
RunAndCapture(IProcessLauncher, ArraySegment<byte>, params string[])
Runs the sub process, captures its stdout and stderr output and waits for it to exit.
public static string RunAndCapture(this IProcessLauncher processLauncher, ArraySegment<byte> stdinData, params string[] arguments)Parameters
- processLauncherIProcessLauncher
- The sub process. 
- stdinDataArraySegment<byte>
- Data to the process' stdin right after startup. 
- argumentsstring[]
- Command-line arguments to launch the process with. 
Returns
- string
- The process' complete stdout output. 
Exceptions
- IOException
- There was a problem launching the executable. 
- FileNotFoundException
- The executable file could not be found. 
- NotAdminException
- The target process requires elevation. 
- ExitCodeException
- The process exited with a non-zero System.Diagnostics.Process.ExitCode. 
RunAndCapture(IProcessLauncher, params string[])
Runs the sub process, captures its stdout and stderr output and waits for it to exit.
public static string RunAndCapture(this IProcessLauncher processLauncher, params string[] arguments)Parameters
- processLauncherIProcessLauncher
- The sub process. 
- argumentsstring[]
- Command-line arguments to launch the process with. 
Returns
- string
- The process' complete stdout output. 
Exceptions
- IOException
- There was a problem launching the executable. 
- FileNotFoundException
- The executable file could not be found. 
- NotAdminException
- The target process requires elevation. 
- ExitCodeException
- The process exited with a non-zero System.Diagnostics.Process.ExitCode.