public void Start() { this._process.StartInfo.RedirectStandardInput = true; this._process.StartInfo.RedirectStandardError = true; this._process.StartInfo.RedirectStandardOutput = true; this._process.StartInfo.UseShellExecute = false; this._process.Start(); this._stdout = new ProcessOutputStreamReader(this._process, this._process.StandardOutput); this._stderr = new ProcessOutputStreamReader(this._process, this._process.StandardError); this._stdin = this._process.StandardInput.BaseStream; }
public void Start(EventHandler exitCallback) { if (exitCallback != null) { this._process.EnableRaisingEvents = true; this._process.Exited += exitCallback; } this._process.StartInfo.RedirectStandardInput = true; this._process.StartInfo.RedirectStandardError = true; this._process.StartInfo.RedirectStandardOutput = true; this._process.StartInfo.UseShellExecute = false; this._process.Start(); this._stdout = new ProcessOutputStreamReader(this._process, this._process.StandardOutput); this._stderr = new ProcessOutputStreamReader(this._process, this._process.StandardError); this._stdin = this._process.StandardInput.BaseStream; }