SequenceReader<T> SequenceReader<T> SequenceReader<T> SequenceReader<T> Struct

Definition

generic <typename T>
 where T : value classpublic value class SequenceReader
public struct SequenceReader<T> where T : struct
type SequenceReader<'T (requires 'T : struct)> = struct
Public Structure SequenceReader(Of T)

Type Parameters

T
Inheritance
SequenceReader<T>SequenceReader<T>SequenceReader<T>SequenceReader<T>

Constructors

SequenceReader<T>(ReadOnlySequence<T>) SequenceReader<T>(ReadOnlySequence<T>) SequenceReader<T>(ReadOnlySequence<T>) SequenceReader<T>(ReadOnlySequence<T>)

Creates a SequenceReader<T> over a given ReadOnlySequence<T>.

Properties

Consumed Consumed Consumed Consumed

Gets the total number of T values processed by the reader.

CurrentSpan CurrentSpan CurrentSpan CurrentSpan

Gets a Span<T> that contains the current segment in the Sequence.

CurrentSpanIndex CurrentSpanIndex CurrentSpanIndex CurrentSpanIndex

Gets the index in the CurrentSpan.

End End End End

Gets a value that indicates whether there is no more data in the Sequence.

Length Length Length Length

Gets the count of items in the reader's Sequence.

Position Position Position Position

Gets the current position in the Sequence.

Remaining Remaining Remaining Remaining

Gets the remaining items in the reader's Sequence.

Sequence Sequence Sequence Sequence

Gets the underlying ReadOnlySequence<T> for the reader.

UnreadSpan UnreadSpan UnreadSpan UnreadSpan

Gets the unread portion of the CurrentSpan.

Methods

Advance(Int64) Advance(Int64) Advance(Int64) Advance(Int64)

Moves the reader ahead a specified number of items.

AdvancePast(T) AdvancePast(T) AdvancePast(T) AdvancePast(T)

Advances past consecutive instances of the given value.

AdvancePastAny(ReadOnlySpan<T>) AdvancePastAny(ReadOnlySpan<T>) AdvancePastAny(ReadOnlySpan<T>) AdvancePastAny(ReadOnlySpan<T>)

Skips consecutive instances of any of the specified values.

AdvancePastAny(T, T) AdvancePastAny(T, T) AdvancePastAny(T, T) AdvancePastAny(T, T)

Advances past consecutive instances of either of two specified values.

AdvancePastAny(T, T, T) AdvancePastAny(T, T, T) AdvancePastAny(T, T, T) AdvancePastAny(T, T, T)

Advances past consecutive instances of any of three specified values.

AdvancePastAny(T, T, T, T) AdvancePastAny(T, T, T, T) AdvancePastAny(T, T, T, T) AdvancePastAny(T, T, T, T)

Advances past consecutive instances of any of four specified values.

IsNext(ReadOnlySpan<T>, Boolean) IsNext(ReadOnlySpan<T>, Boolean) IsNext(ReadOnlySpan<T>, Boolean) IsNext(ReadOnlySpan<T>, Boolean)

Checks whether the values specified in a read-only span are next in the sequence.

IsNext(T, Boolean) IsNext(T, Boolean) IsNext(T, Boolean) IsNext(T, Boolean)

Checks whether a specified value is next in the sequence.

Rewind(Int64) Rewind(Int64) Rewind(Int64) Rewind(Int64)

Moves the reader back the specified number of items.

TryAdvanceTo(T, Boolean) TryAdvanceTo(T, Boolean) TryAdvanceTo(T, Boolean) TryAdvanceTo(T, Boolean)

Searches for a specified delimiter and optionally advances past it if it is found.

TryAdvanceToAny(ReadOnlySpan<T>, Boolean) TryAdvanceToAny(ReadOnlySpan<T>, Boolean) TryAdvanceToAny(ReadOnlySpan<T>, Boolean) TryAdvanceToAny(ReadOnlySpan<T>, Boolean)

Searches for any of a number of specified delimiters and optionally advances past the first one to be found.

TryCopyTo(Span<T>) TryCopyTo(Span<T>) TryCopyTo(Span<T>) TryCopyTo(Span<T>)

Copies data from the current position to the given destination span if there is enough data to fill it.

TryPeek(T) TryPeek(T) TryPeek(T) TryPeek(T)

Peeks at the next value without advancing the reader.

TryRead(T) TryRead(T) TryRead(T) TryRead(T)

Reads the next value and advance the reader.

TryReadTo(ReadOnlySequence<T>, ReadOnlySpan<T>, Boolean) TryReadTo(ReadOnlySequence<T>, ReadOnlySpan<T>, Boolean) TryReadTo(ReadOnlySequence<T>, ReadOnlySpan<T>, Boolean) TryReadTo(ReadOnlySequence<T>, ReadOnlySpan<T>, Boolean)

Tries to read data until the entire delimiter specified as a read-only span matches.

TryReadTo(ReadOnlySequence<T>, T, Boolean) TryReadTo(ReadOnlySequence<T>, T, Boolean) TryReadTo(ReadOnlySequence<T>, T, Boolean) TryReadTo(ReadOnlySequence<T>, T, Boolean)

Tries to read everything up to the given delimiter.

TryReadTo(ReadOnlySpan<T>, T, Boolean) TryReadTo(ReadOnlySpan<T>, T, Boolean) TryReadTo(ReadOnlySpan<T>, T, Boolean) TryReadTo(ReadOnlySpan<T>, T, Boolean)

Tries to read everything up to the given delimiter.

TryReadTo(ReadOnlySequence<T>, T, T, Boolean) TryReadTo(ReadOnlySequence<T>, T, T, Boolean) TryReadTo(ReadOnlySequence<T>, T, T, Boolean) TryReadTo(ReadOnlySequence<T>, T, T, Boolean)

Tries to read everything up to the given delimiter, ignoring delimiters that are preceded by delimiterEscape.

TryReadTo(ReadOnlySpan<T>, T, T, Boolean) TryReadTo(ReadOnlySpan<T>, T, T, Boolean) TryReadTo(ReadOnlySpan<T>, T, T, Boolean) TryReadTo(ReadOnlySpan<T>, T, T, Boolean)

Tries to read everything up to the given delimiter, ignoring delimiters that are preceded by delimiterEscape.

TryReadToAny(ReadOnlySequence<T>, ReadOnlySpan<T>, Boolean) TryReadToAny(ReadOnlySequence<T>, ReadOnlySpan<T>, Boolean) TryReadToAny(ReadOnlySequence<T>, ReadOnlySpan<T>, Boolean) TryReadToAny(ReadOnlySequence<T>, ReadOnlySpan<T>, Boolean)

Tries to read everything up to any of the specified delimiters.

TryReadToAny(ReadOnlySpan<T>, ReadOnlySpan<T>, Boolean) TryReadToAny(ReadOnlySpan<T>, ReadOnlySpan<T>, Boolean) TryReadToAny(ReadOnlySpan<T>, ReadOnlySpan<T>, Boolean) TryReadToAny(ReadOnlySpan<T>, ReadOnlySpan<T>, Boolean)

Tries to read everything up to any of the specified delimiters.

Applies to