when running another program the current impl. "blocks" the input stream. Effect is that all messages will only be written to console when the process finished.
Expected behaviour: Write messages as soon as they created.
Fix
// ProcessRunner.cs:Start(ProcessStartInfo startInfo)
_process.OutputDataReceived += OnDataReceived;
_process.ErrorDataReceived += OnDataReceived;
_process.Start();
_process.BeginOutputReadLine();
//REMOVE Console.Out.WriteLine(_process.StandardOutput.ReadToEnd());
static void OnDataReceived(object sender, DataReceivedEventArgs e)
{
Console.WriteLine(e.Data);
}
when running another program the current impl. "blocks" the input stream. Effect is that all messages will only be written to console when the process finished.
Expected behaviour: Write messages as soon as they created.
Fix