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

Definizione

Rappresenta una sequenza in grado di leggere una serie sequenziale di 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)

Parametri di tipo

T
Ereditarietà
ReadOnlySequence<T>ReadOnlySequence<T>ReadOnlySequence<T>ReadOnlySequence<T>

Costruttori

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

Crea un'istanza di ReadOnlySequence<T> da 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 un'istanza di ReadOnlySequence<T> da 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 un'istanza di ReadOnlySequence<T> da una sezione di una matrice.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 un'istanza di ReadOnlySequence<T> da un elenco di memoria collegata rappresentato da segmenti iniziali e finali e dagli indici corrispondenti in essi contenuti.Creates an instance of a ReadOnlySequence<T> from a linked memory list represented by start and end segments and the corresponding indexes in them.

Campi

Empty Empty Empty Empty

Restituisce un oggetto ReadOnlySequence<T> vuotoReturns an empty ReadOnlySequence<T>

Proprietà

End End End End

Ottiene la posizione alla fine di ReadOnlySequence<T>.Gets the position at the end of the ReadOnlySequence<T>.

First First First First

Ottiene ReadOnlyMemory<T> dal primo segmento.Gets the ReadOnlyMemory<T> from the first segment.

FirstSpan FirstSpan FirstSpan FirstSpan
IsEmpty IsEmpty IsEmpty IsEmpty

Ottiene un valore che indica se ReadOnlySequence<T> è vuoto.Gets a value that indicates whether the ReadOnlySequence<T> is empty.

IsSingleSegment IsSingleSegment IsSingleSegment IsSingleSegment

Ottiene un valore che indica se ReadOnlySequence<T> contiene un singolo segmento ReadOnlyMemory<T>.Gets a value that indicates whether the ReadOnlySequence<T> contains a single ReadOnlyMemory<T> segment.

Length Length Length Length

Ottiene la lunghezza dell'oggetto ReadOnlySequence<T>.Gets the length of the ReadOnlySequence<T>.

Start Start Start Start

Ottiene la posizione all'inizio di ReadOnlySequence<T>.Gets the position to the start of the ReadOnlySequence<T>.

Metodi

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

Restituisce un enumeratore per ReadOnlySequence<T>.Returns an enumerator over the ReadOnlySequence<T>.

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

Restituisce una nuova SequencePosition in corrispondenza di offset dall'inizio della sequenza.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)

Restituisce una nuova SequencePosition in corrispondenza di offset da origin.Returns a new SequencePosition at an offset from the origin.

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

Crea una sezione dall'oggetto ReadOnlySequence<T> corrente, iniziando in corrispondenza dell'indice specificato e continuando fino alla fine della sequenza di sola lettura.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)

Crea una sezione dall'oggetto ReadOnlySequence<T> corrente, iniziando in corrispondenza della posizione della sequenza specificata e continuando fino alla fine della sequenza di sola lettura.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)

Crea una sezione dall'oggetto ReadOnlySequence<T> corrente, a partire da start, con length elementi.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)

Crea una sezione dall'oggetto ReadOnlySequence<T> corrente, a partire da start e fino a end (esclusivo).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)

Crea una sezione dall'oggetto ReadOnlySequence<T> specificato, a partire da start, con length elementi.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)

Crea una sezione dall'oggetto ReadOnlySequence<T> corrente, a partire da start e fino a end (esclusivo).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)

Crea una sezione dall'oggetto ReadOnlySequence<T> corrente, a partire da start, con length elementi.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)

Crea una sezione dall'oggetto ReadOnlySequence<T> corrente, a partire da start, con length elementi.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)

Crea una sezione dall'oggetto ReadOnlySequence<T> corrente, a partire da start e fino a end (esclusivo).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)

Tenta di recuperare il segmento successivo dopo position e restituisce un valore che indica se l'operazione è riuscita.Tries to retrieve the next segment after position and returns a value that indicates whether the operation succeeded.

Extension Methods

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 ReadOnlySequence<T> nel Span<T> specificato.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)

Restituisce la posizione della prima occorrenza di item in 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>)

Converte ReadOnlySequence<T> in una matrice.Converts the ReadOnlySequence<T> to an array.

Si applica a