ReadOnlySequence<T>
Represents a sequence that can read a sequential series of .
An enumerator over the ReadOnlySequence<T>
Returns empty ReadOnlySequence<T>
A position to the end of the ReadOnlySequence<T>
Gets ReadOnlyMemory<T> from the first segment.
Determines if the ReadOnlySequence<T> is empty.
Determines if the ReadOnlySequence<T> contains a single ReadOnlyMemory<T> segment.
Length of the ReadOnlySequence<T>.
A position to the start of the ReadOnlySequence<T>.
public ReadOnlySequence(ReadOnlySequenceSegment<T> startSegment, int startIndex, ReadOnlySequenceSegment<T> endSegment, int endIndex)
Creates an instance of ReadOnlySequence<T> from linked memory list represented by start and end segments
and corresponding indexes in them.
Creates an instance of ReadOnlySequence<T> from the T[].
Creates an instance of ReadOnlySequence<T> from the T[], start and index.
Creates an instance of ReadOnlySequence<T> from the ReadOnlyMemory<T>.
Consumer is expected to manage lifetime of memory until ReadOnlySequence<T> is not used anymore.
Returns an enumerator over the ReadOnlySequence<T>
Returns a new SequencePosition at an offset from the start of the sequence.
Forms a slice out of the given ReadOnlySequence<T>, beginning at start, ending at the existing ReadOnlySequence<T>'s end.
Forms a slice out of the given ReadOnlySequence<T>, beginning at start, ending at the existing ReadOnlySequence<T>'s end.
Tries to retrieve next segment after position and return its contents in memory.
Returns false if end of ReadOnlySequence<T> was reached otherwise true.
Sets position to the beginning of next segment if advance is set to true.