예제 #1
0
		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;
		}
예제 #2
0
 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;
 }