Correcting implementation of .NET DriverProcessStarted event
@@ -39,9 +39,16 @@ public class DriverProcessStartedEventArgs : EventArgs
public DriverProcessStartedEventArgs(Process driverProcess)
{
this.processId = driverProcess.Id;
+ if (driverProcess.StartInfo.RedirectStandardOutput && !driverProcess.StartInfo.UseShellExecute)
+ {
this.standardOutputStreamReader = driverProcess.StandardOutput;
+ }
+
+ if (driverProcess.StartInfo.RedirectStandardError && !driverProcess.StartInfo.UseShellExecute)
+ {
this.standardErrorStreamReader = driverProcess.StandardError;
}
+ }
/// <summary>
/// Gets the unique ID of the driver executable process.
