This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ProcessHelper | |
{ | |
/// <summary> | |
/// Starts a command line process, redirecting both StdOut and StdErr. | |
/// </summary> | |
/// <param name="fileName">Path to the executable</param> | |
/// <param name="arguments">Command line arguments</param> | |
/// <param name="onErr">Action to perform when data from the child process is read from StdErr. The action takes 2 parameters: a Process instance (representing the child process) and a string (the data it wrote to StdErr)</param> | |
/// <param name="onOut">Action to perform when data from the child process is read from StdOut. The action takes 2 parameters: a Process instance (representing the child process) and a string (the data it wrote to StdOut)</param> | |
/// <returns></returns> |