Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion xml/System.Diagnostics/DataReceivedEventArgs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
</ReturnValue>
<Docs>
<summary>Gets the line of characters that was written to a redirected <see cref="T:System.Diagnostics.Process" /> output stream.</summary>
<value>The line that was written by an associated <see cref="T:System.Diagnostics.Process" /> to its redirected <see cref="P:System.Diagnostics.Process.StandardOutput" /> or <see cref="P:System.Diagnostics.Process.StandardError" /> stream.</value>
<value>The line that was written by an associated <see cref="T:System.Diagnostics.Process" /> to its redirected <see cref="P:System.Diagnostics.Process.StandardOutput" /> or <see cref="P:System.Diagnostics.Process.StandardError" /> stream. This value is <see langword="null" /> if the end of the stream has been reached.</value>
Comment thread
adamsitnik marked this conversation as resolved.
Outdated
<remarks>
<format type="text/markdown"><![CDATA[

Expand Down
4 changes: 4 additions & 0 deletions xml/System.Diagnostics/Process.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1027,6 +1027,8 @@ The following code example creates a process that prints a file. It sets the <xr
## Remarks
The <xref:System.Diagnostics.Process.ErrorDataReceived> event indicates that the associated <xref:System.Diagnostics.Process> has written a line that's terminated with a newline (carriage return (CR), line feed (LF), or CR+LF) to its redirected <xref:System.Diagnostics.Process.StandardError*> stream.

The event is also raised when the end of the redirected stream is reached. In that case, the <xref:System.Diagnostics.DataReceivedEventArgs.Data> property of the event handler's <xref:System.Diagnostics.DataReceivedEventArgs> is `null`.

The event only occurs during asynchronous read operations on <xref:System.Diagnostics.Process.StandardError*>. To start asynchronous read operations, you must redirect the <xref:System.Diagnostics.Process.StandardError*> stream of a <xref:System.Diagnostics.Process>, add your event handler to the <xref:System.Diagnostics.Process.ErrorDataReceived> event, and call <xref:System.Diagnostics.Process.BeginErrorReadLine*>. Thereafter, the <xref:System.Diagnostics.Process.ErrorDataReceived> event signals each time the process writes a line to the redirected <xref:System.Diagnostics.Process.StandardError*> stream, until the process exits or calls <xref:System.Diagnostics.Process.CancelErrorRead*>.

> [!NOTE]
Expand Down Expand Up @@ -3134,6 +3136,8 @@ If no main module is found, it could be because the process hasn't finished load
## Remarks
The <xref:System.Diagnostics.Process.OutputDataReceived> event indicates that the associated <xref:System.Diagnostics.Process> has written a line that's terminated with a newline (carriage return (CR), line feed (LF), or CR+LF) to its redirected <xref:System.Diagnostics.Process.StandardOutput*> stream.

The event is also raised when the end of the redirected stream is reached. In that case, the <xref:System.Diagnostics.DataReceivedEventArgs.Data> property of the event handler's <xref:System.Diagnostics.DataReceivedEventArgs> is `null`.

The event is enabled during asynchronous read operations on <xref:System.Diagnostics.Process.StandardOutput*>. To start asynchronous read operations, you must redirect the <xref:System.Diagnostics.Process.StandardOutput*> stream of a <xref:System.Diagnostics.Process>, add your event handler to the <xref:System.Diagnostics.Process.OutputDataReceived> event, and call <xref:System.Diagnostics.Process.BeginOutputReadLine*>. Thereafter, the <xref:System.Diagnostics.Process.OutputDataReceived> event signals each time the process writes a line to the redirected <xref:System.Diagnostics.Process.StandardOutput*> stream, until the process exits or calls <xref:System.Diagnostics.Process.CancelOutputRead*>.

> [!NOTE]
Expand Down
Loading