Esempio n. 1
0
 private static void WatchOutputStream()
 {
     while (!CompilerProcess.StandardOutput.EndOfStream)
     {
         OutputStringBuilder.AppendLine(CompilerProcess.StandardOutput.ReadLine());
     }
 }
Esempio n. 2
0
        private static void WatchOutputStream()
        {
            while (!ThatProgramProcess.StandardOutput.EndOfStream)
            {
                OutputStringBuilder.AppendLine(ThatProgramProcess.StandardOutput.ReadLine());

                //检测OLE
                if (OutputStringBuilder.Length > OutputLimit)
                {
                    //强制结束进程
                    try { ThatProgramProcess.Kill(); }
                    catch (Exception) { }
                    StatusCode = Const.StatusCodeOutputLimitExceeded;
                    break;
                }
            }
        }