ReadOnlySequence<T> ReadOnlySequence<T> ReadOnlySequence<T> ReadOnlySequence<T> Struct

Definición

Representa una secuencia que puede leer una serie secuencial de T.Represents a sequence that can read a sequential series of T.

generic <typename T>
public value class ReadOnlySequence
public struct ReadOnlySequence<T>
type ReadOnlySequence<'T> = struct
Public Structure ReadOnlySequence(Of T)

Parámetros de tipo

T
Herencia
ReadOnlySequence<T>ReadOnlySequence<T>ReadOnlySequence<T>ReadOnlySequence<T>

Constructores

ReadOnlySequence<T>(ReadOnlyMemory<T>) ReadOnlySequence<T>(ReadOnlyMemory<T>) ReadOnlySequence<T>(ReadOnlyMemory<T>) ReadOnlySequence<T>(ReadOnlyMemory<T>)

Crea una instancia de ReadOnlySequence<T> a partir de ReadOnlyMemory<T>.Creates an instance of ReadOnlySequence<T> from a ReadOnlyMemory<T>.

ReadOnlySequence<T>(T[]) ReadOnlySequence<T>(T[]) ReadOnlySequence<T>(T[]) ReadOnlySequence<T>(T[])

Crea una instancia de ReadOnlySequence<T> a partir de array.Creates an instance of ReadOnlySequence<T> from the array.

ReadOnlySequence<T>(T[], Int32, Int32) ReadOnlySequence<T>(T[], Int32, Int32) ReadOnlySequence<T>(T[], Int32, Int32) ReadOnlySequence<T>(T[], Int32, Int32)

Crea una instancia de un ReadOnlySequence<T> a partir de una sección de una matriz.Creates an instance of a ReadOnlySequence<T> from a section of an array.

ReadOnlySequence<T>(ReadOnlySequenceSegment<T>, Int32, ReadOnlySequenceSegment<T>, Int32) ReadOnlySequence<T>(ReadOnlySequenceSegment<T>, Int32, ReadOnlySequenceSegment<T>, Int32) ReadOnlySequence<T>(ReadOnlySequenceSegment<T>, Int32, ReadOnlySequenceSegment<T>, Int32) ReadOnlySequence<T>(ReadOnlySequenceSegment<T>, Int32, ReadOnlySequenceSegment<T>, Int32)

Crea una instancia de un ReadOnlySequence<T> a partir de una lista vinculada de memoria representada por segmentos de inicio y finalización y los índices correspondientes en ellos.Creates an instance of a ReadOnlySequence<T> from a linked memory list represented by start and end segments and the corresponding indexes in them.

Campos

Empty Empty Empty Empty

Devuelve una ReadOnlySequence<T> vacíaReturns an empty ReadOnlySequence<T>

Propiedades

End End End End

Obtiene la posición del final de ReadOnlySequence<T>.Gets the position at the end of the ReadOnlySequence<T>.

First First First First

Obtiene el ReadOnlyMemory<T> del primer segmento.Gets the ReadOnlyMemory<T> from the first segment.

FirstSpan FirstSpan FirstSpan FirstSpan

Obtiene el ReadOnlySpan<T> del primer segmento.Gets the ReadOnlySpan<T> from the first segment.

IsEmpty IsEmpty IsEmpty IsEmpty

Obtiene un valor que indica si la colección ReadOnlySequence<T> está vacía.Gets a value that indicates whether the ReadOnlySequence<T> is empty.

IsSingleSegment IsSingleSegment IsSingleSegment IsSingleSegment

Obtiene un valor que indica si el ReadOnlySequence<T> contiene un único segmento ReadOnlyMemory<T>.Gets a value that indicates whether the ReadOnlySequence<T> contains a single ReadOnlyMemory<T> segment.

Length Length Length Length

Obtiene la longitud de ReadOnlySequence<T>.Gets the length of the ReadOnlySequence<T>.

Start Start Start Start

Obtiene la posición al inicio de ReadOnlySequence<T>.Gets the position to the start of the ReadOnlySequence<T>.

Métodos

GetEnumerator() GetEnumerator() GetEnumerator() GetEnumerator()

Devuelve un enumerador sobre el ReadOnlySequence<T>.Returns an enumerator over the ReadOnlySequence<T>.

GetPosition(Int64) GetPosition(Int64) GetPosition(Int64) GetPosition(Int64)

Devuelve un nuevo SequencePosition en un offset desde el principio de la secuencia.Returns a new SequencePosition at an offset from the start of the sequence.

GetPosition(Int64, SequencePosition) GetPosition(Int64, SequencePosition) GetPosition(Int64, SequencePosition) GetPosition(Int64, SequencePosition)

Devuelve un nuevo SequencePosition en un offset desde el origin.Returns a new SequencePosition at an offset from the origin.

Slice(Int64) Slice(Int64) Slice(Int64) Slice(Int64)

Forma un segmento del elemento ReadOnlySequence<T> actual que comienza en un índice especificado y continúa hasta el final de la secuencia de solo lectura.Forms a slice out of the current ReadOnlySequence<T>, beginning at a specified index and continuing to the end of the read-only sequence.

Slice(SequencePosition) Slice(SequencePosition) Slice(SequencePosition) Slice(SequencePosition)

Forma un segmento del elemento ReadOnlySequence<T> actual que comienza en una posición de secuencia especificada y continúa hasta el final de la secuencia de solo lectura.Forms a slice out of the current ReadOnlySequence<T>, beginning at a specified sequence position and continuing to the end of the read-only sequence.

Slice(Int32, Int32) Slice(Int32, Int32) Slice(Int32, Int32) Slice(Int32, Int32)

Forma un segmento del elemento actual ReadOnlySequence<T> que comienza en start, con elementos length.Forms a slice out of the current ReadOnlySequence<T>, beginning at start, with length items.

Slice(Int32, SequencePosition) Slice(Int32, SequencePosition) Slice(Int32, SequencePosition) Slice(Int32, SequencePosition)

Forma un segmento del elemento actual ReadOnlySequence<T> que comienza en start y finaliza en end (exclusivo).Forms a slice out of the current ReadOnlySequence<T>, beginning at start and ending at end (exclusive).

Slice(Int64, Int64) Slice(Int64, Int64) Slice(Int64, Int64) Slice(Int64, Int64)

Forma un segmento del ReadOnlySequence<T> proporcionado, comenzando en start, con length elementos.Forms a slice out of the given ReadOnlySequence<T>, beginning at start, with length items.

Slice(Int64, SequencePosition) Slice(Int64, SequencePosition) Slice(Int64, SequencePosition) Slice(Int64, SequencePosition)

Forma un segmento del elemento actual ReadOnlySequence<T> que comienza en start y finaliza en end (exclusivo).Forms a slice out of the current ReadOnlySequence<T>, beginning at start and ending at end (exclusive).

Slice(SequencePosition, Int32) Slice(SequencePosition, Int32) Slice(SequencePosition, Int32) Slice(SequencePosition, Int32)

Forma un segmento del elemento actual ReadOnlySequence<T> que comienza en start, con elementos length.Forms a slice out of the current ReadOnlySequence<T>, beginning at start, with length items.

Slice(SequencePosition, Int64) Slice(SequencePosition, Int64) Slice(SequencePosition, Int64) Slice(SequencePosition, Int64)

Forma un segmento del elemento actual ReadOnlySequence<T> que comienza en start, con elementos length.Forms a slice out of the current ReadOnlySequence<T>, beginning at start, with length items.

Slice(SequencePosition, SequencePosition) Slice(SequencePosition, SequencePosition) Slice(SequencePosition, SequencePosition) Slice(SequencePosition, SequencePosition)

Forma un segmento del elemento actual ReadOnlySequence<T> que comienza en start y finaliza en end (exclusivo).Forms a slice out of the current ReadOnlySequence<T>, beginning at start and ending at end (exclusive).

ToString() ToString() ToString() ToString()
TryGet(SequencePosition, ReadOnlyMemory<T>, Boolean) TryGet(SequencePosition, ReadOnlyMemory<T>, Boolean) TryGet(SequencePosition, ReadOnlyMemory<T>, Boolean) TryGet(SequencePosition, ReadOnlyMemory<T>, Boolean)

Intenta recuperar el siguiente segmento después de position y devuelve un valor que indica si la operación se realizó correctamente.Tries to retrieve the next segment after position and returns a value that indicates whether the operation succeeded.

Métodos de extensión

CopyTo<T>(ReadOnlySequence<T>, Span<T>) CopyTo<T>(ReadOnlySequence<T>, Span<T>) CopyTo<T>(ReadOnlySequence<T>, Span<T>) CopyTo<T>(ReadOnlySequence<T>, Span<T>)

Copia el ReadOnlySequence<T> al Span<T> especificado.Copies the ReadOnlySequence<T> to the specified Span<T>.

PositionOf<T>(ReadOnlySequence<T>, T) PositionOf<T>(ReadOnlySequence<T>, T) PositionOf<T>(ReadOnlySequence<T>, T) PositionOf<T>(ReadOnlySequence<T>, T)

Devuelve la posición de la primera repetición de item en ReadOnlySequence<T>.Returns the position of the first occurrence of item in the ReadOnlySequence<T>.

ToArray<T>(ReadOnlySequence<T>) ToArray<T>(ReadOnlySequence<T>) ToArray<T>(ReadOnlySequence<T>) ToArray<T>(ReadOnlySequence<T>)

Convierte ReadOnlySequence<T> en una matriz.Converts the ReadOnlySequence<T> to an array.

Se aplica a