xtd 0.2.0
Loading...
Searching...
No Matches

◆ output_data_received

output_data_received_event xtd::diagnostics::process::output_data_received

Occurs each time an application writes a line to its redirected xtd::diagnostics::process::standard_output stream.

Remarks
The xtd::diagnostics::process::output_data_received event indicates that the associatedxtd::diagnostics::process has written a line that's terminated with a newline (carriage return (CR), line feed (LF), or CR+LF) to its redirected xtd::diagnostics::process::standard_output stream.
The event is enabled during asynchronous read operations on xtd::diagnostics::process::standard_output. To start asynchronous read operations, you must redirect the standard_output stream of a xtd::diagnostics::process, add your event handler to the xtd::diagnostics::process::Output_data_received event, and call xtd::diagnostics::process::begin_output_read_line. Thereafter, the xtd::diagnostics::process::output_dData_rReceived event signals each time the process writes a line to the redirected xtd::diagnostics::process::standard_output stream, until the process exits or calls xtd::diagnostics::process::cancel_output_read.
Note
The application that is processing the asynchronous output should call the WaitForExit method to ensure that the output buffer has been flushed.