Skip to content

Commit 12efe13

Browse files
Update PipeReader.xml to add info to AdvanceTo (#4311)
* Update PipeReader.xml to add info to AdvanceTo Co-authored-by: Stephen Halter <[email protected]>
1 parent 1da4188 commit 12efe13

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

xml/System.IO.Pipelines/PipeReader.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
6060
The memory for the consumed data will be released and no longer available. The <xref:System.IO.Pipelines.ReadResult.Buffer%2A> previously returned from <xref:System.IO.Pipelines.PipeReader.ReadAsync(System.Threading.CancellationToken)> must not be accessed after this call. The examined data communicates to the pipeline when it should signal more data is available.
6161
62+
6263
]]></format>
6364
</remarks>
6465
</Docs>
@@ -97,8 +98,11 @@ The memory for the consumed data will be released and no longer available.
9798
9899
The <xref:System.IO.Pipelines.ReadResult.Buffer> previously returned from <xref:System.IO.Pipelines.PipeReader.ReadAsync(System.Threading.CancellationToken)> must not be accessed after this call.
99100
101+
This is equivalent to calling <xref:System.IO.Pipelines.PipeReader.AdvanceTo(System.SequencePosition,System.SequencePosition)> with identical examined and consumed positions.
100102
The examined data communicates to the pipeline when it should signal more data is available.
101103
104+
Because the consumed parameter doubles as the examined parameter, the consumed parameter should be greater than or equal to the examined position in the previous call to `AdvanceTo`. Otherwise, an <xref:System.InvalidOperationException> is thrown.
105+
102106
]]></format>
103107
</remarks>
104108
</Docs>
@@ -141,6 +145,8 @@ The <xref:System.IO.Pipelines.ReadResult.Buffer> previously returned from <xref:
141145
142146
The examined data communicates to the pipeline when it should signal more data is available.
143147
148+
The examined parameter should be greater than or equal to the examined position in the previous call to `AdvanceTo`. Otherwise, an <xref:System.InvalidOperationException> is thrown.
149+
144150
]]></format>
145151
</remarks>
146152
</Docs>

0 commit comments

Comments
 (0)