コード例 #1
0
ファイル: Pipe.cs プロジェクト: ben-biddington/Bang
 public void ConnectTo(System.Diagnostics.Process process)
 {
     process.BeginOutputReadLine();
     process.BeginErrorReadLine();
     process.OutputDataReceived += OnOut;
     process.ErrorDataReceived += OnErr;
 }
コード例 #2
0
ファイル: RunScript.cs プロジェクト: HITSUN2015/duplicati
            public ConsoleDataHandler(System.Diagnostics.Process p)
            {
                p.OutputDataReceived += new System.Diagnostics.DataReceivedEventHandler(HandleOutputDataReceived);
                p.ErrorDataReceived += new System.Diagnostics.DataReceivedEventHandler(HandleErrorDataReceived);

                p.BeginErrorReadLine();
                p.BeginOutputReadLine();
            }