Skip to content

Commit 7f46dbf

Browse files
Improve CancelPendingRead/Flush() docs (#5033)
* Improve PipeWriter.CancelPendingFlush() docs * Improve PipeReader.CancelPendingRead() docs * Apply suggestions from code review Co-authored-by: Carlos Sanchez <[email protected]> Co-authored-by: Carlos Sanchez <[email protected]>
1 parent 8fb77e4 commit 7f46dbf

File tree

4 files changed

+23
-7
lines changed

4 files changed

+23
-7
lines changed

xml/System.IO.Pipelines/FlushResult.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@
7171
<ReturnType>System.Boolean</ReturnType>
7272
</ReturnValue>
7373
<Docs>
74-
<summary>Gets a value that indicates whether the current <see cref="M:System.IO.Pipelines.PipeWriter.FlushAsync(System.Threading.CancellationToken)" /> operation was canceled.</summary>
74+
<summary>Gets a value that indicates whether the current <see cref="M:System.IO.Pipelines.PipeWriter.FlushAsync(System.Threading.CancellationToken)" /> operation was canceled by <see cref="M:System.IO.Pipelines.PipeWriter.CancelPendingFlush" />.</summary>
7575
<value>
76-
<see langword="true" /> if the current <see cref="M:System.IO.Pipelines.PipeWriter.FlushAsync(System.Threading.CancellationToken)" /> operation was canceled; otherwise, <see langword="false" />.</value>
76+
<see langword="true" /> if the current <see cref="M:System.IO.Pipelines.PipeWriter.FlushAsync(System.Threading.CancellationToken)" /> operation was canceled by <see cref="M:System.IO.Pipelines.PipeWriter.CancelPendingFlush" />; otherwise, <see langword="false" />.</value>
7777
<remarks>To be added.</remarks>
7878
</Docs>
7979
</Member>

xml/System.IO.Pipelines/PipeReader.xml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,16 @@ The examined parameter should be greater than or equal to the examined position
198198
</ReturnValue>
199199
<Parameters />
200200
<Docs>
201-
<summary>Cancels to currently pending or if none is pending next call to <see cref="M:System.IO.Pipelines.PipeReader.ReadAsync(System.Threading.CancellationToken)" />, without completing the <see cref="T:System.IO.Pipelines.PipeReader" />.</summary>
202-
<remarks>To be added.</remarks>
201+
<summary>Cancels the pending <see cref="M:System.IO.Pipelines.PipeReader.ReadAsync(System.Threading.CancellationToken)" /> operation without causing it to throw and without completing the <see cref="T:System.IO.Pipelines.PipeReader" />. If there is no pending operation, this cancels the next operation.</summary>
202+
<remarks>
203+
<format type="text/markdown"><![CDATA[
204+
205+
## Remarks
206+
207+
The canceled <xref:System.IO.Pipelines.PipeReader.ReadAsync(System.Threading.CancellationToken)> operation returns a <xref:System.IO.Pipelines.ReadResult> where <xref:System.IO.Pipelines.ReadResult.IsCanceled> is `true`.
208+
209+
]]></format>
210+
</remarks>
203211
</Docs>
204212
</Member>
205213
<Member MemberName="Complete">

xml/System.IO.Pipelines/PipeWriter.xml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,16 @@
126126
</ReturnValue>
127127
<Parameters />
128128
<Docs>
129-
<summary>Cancels the pending <see cref="M:System.IO.Pipelines.PipeWriter.FlushAsync(System.Threading.CancellationToken)" /> operation. If there is none, cancels next <see cref="M:System.IO.Pipelines.PipeWriter.FlushAsync(System.Threading.CancellationToken)" /> operation, without completing the <see cref="T:System.IO.Pipelines.PipeWriter" />.</summary>
130-
<remarks>To be added.</remarks>
129+
<summary>Cancels the pending <see cref="M:System.IO.Pipelines.PipeWriter.FlushAsync(System.Threading.CancellationToken)" /> or <see cref="M:System.IO.Pipelines.PipeWriter.WriteAsync(System.ReadOnlyMemory{System.Byte},System.Threading.CancellationToken)" /> operation without causing the operation to throw and without completing the <see cref="T:System.IO.Pipelines.PipeWriter" />. If there is no pending operation, this cancels the next operation.</summary>
130+
<remarks>
131+
<format type="text/markdown"><![CDATA[
132+
133+
## Remarks
134+
135+
The canceled <xref:System.IO.Pipelines.PipeWriter.FlushAsync(System.Threading.CancellationToken)> or <xref:System.IO.Pipelines.PipeWriter.WriteAsync(System.ReadOnlyMemory{System.Byte},System.Threading.CancellationToken)> operation returns a <xref:System.IO.Pipelines.FlushResult> where <xref:System.IO.Pipelines.FlushResult.IsCanceled> is `true`.
136+
137+
]]></format>
138+
</remarks>
131139
</Docs>
132140
</Member>
133141
<Member MemberName="Complete">

xml/System.IO.Pipelines/ReadResult.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696
<ReturnType>System.Boolean</ReturnType>
9797
</ReturnValue>
9898
<Docs>
99-
<summary>Gets a value that indicates whether the current <see cref="M:System.IO.Pipelines.PipeReader.ReadAsync(System.Threading.CancellationToken)" /> operation was canceled.</summary>
99+
<summary>Gets a value that indicates whether the current <see cref="M:System.IO.Pipelines.PipeReader.ReadAsync(System.Threading.CancellationToken)" /> operation was canceled by <see cref="M:System.IO.Pipelines.PipeReader.CancelPendingRead" />.</summary>
100100
<value>
101101
<see langword="true" /> if the <see cref="M:System.IO.Pipelines.PipeReader.ReadAsync(System.Threading.CancellationToken)" /> operation that produced this <see cref="T:System.IO.Pipelines.ReadResult" /> was canceled by <see cref="M:System.IO.Pipelines.PipeReader.CancelPendingRead" />; otherwise, <see langword="false" />.</value>
102102
<remarks>To be added.</remarks>

0 commit comments

Comments
 (0)