PipeReader.AdvanceTo Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Moves forward the pipeline's read cursor to after the consumed data.
Overloads
AdvanceTo(SequencePosition) |
Moves forward the pipeline's read cursor to after the consumed data, marking the data as processed. |
AdvanceTo(SequencePosition, SequencePosition) |
Moves forward the pipeline's read cursor to after the consumed data, marking the data as processed, read and examined. |
Remarks
The memory for the consumed data will be released and no longer available. The Buffer previously returned from ReadAsync(CancellationToken) must not be accessed after this call. The examined data communicates to the pipeline when it should signal more data is available.
AdvanceTo(SequencePosition)
- Source:
- PipeReader.cs
- Source:
- PipeReader.cs
- Source:
- PipeReader.cs
- Source:
- PipeReader.cs
Moves forward the pipeline's read cursor to after the consumed data, marking the data as processed.
public:
abstract void AdvanceTo(SequencePosition consumed);
public abstract void AdvanceTo (SequencePosition consumed);
abstract member AdvanceTo : SequencePosition -> unit
Public MustOverride Sub AdvanceTo (consumed As SequencePosition)
Parameters
- consumed
- SequencePosition
Marks the extent of the data that has been successfully processed.
Remarks
The memory for the consumed data will be released and no longer available.
The Buffer previously returned from ReadAsync(CancellationToken) must not be accessed after this call.
This is equivalent to calling AdvanceTo(SequencePosition, SequencePosition) with identical examined and consumed positions. The examined data communicates to the pipeline when it should signal more data is available.
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 InvalidOperationException is thrown.
Applies to
AdvanceTo(SequencePosition, SequencePosition)
- Source:
- PipeReader.cs
- Source:
- PipeReader.cs
- Source:
- PipeReader.cs
- Source:
- PipeReader.cs
Moves forward the pipeline's read cursor to after the consumed data, marking the data as processed, read and examined.
public:
abstract void AdvanceTo(SequencePosition consumed, SequencePosition examined);
public abstract void AdvanceTo (SequencePosition consumed, SequencePosition examined);
abstract member AdvanceTo : SequencePosition * SequencePosition -> unit
Public MustOverride Sub AdvanceTo (consumed As SequencePosition, examined As SequencePosition)
Parameters
- consumed
- SequencePosition
Marks the extent of the data that has been successfully processed.
- examined
- SequencePosition
Marks the extent of the data that has been read and examined.
Remarks
The memory for the consumed data will be released and no longer available.
The Buffer previously returned from ReadAsync(CancellationToken) must not be accessed after this call.
The examined data communicates to the pipeline when it should signal more data is available.
The examined parameter should be greater than or equal to the examined position in the previous call to AdvanceTo
. Otherwise, an InvalidOperationException is thrown.
Applies to
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기