Condividi tramite


SequenceMarshal.TryGetReadOnlySequenceSegment<T> Metodo

Definizione

Tenta di recuperare un segmento di sequenza di sola lettura dalla sequenza di sola lettura specificata.

public:
generic <typename T>
 static bool TryGetReadOnlySequenceSegment(System::Buffers::ReadOnlySequence<T> sequence, [Runtime::InteropServices::Out] System::Buffers::ReadOnlySequenceSegment<T> ^ % startSegment, [Runtime::InteropServices::Out] int % startIndex, [Runtime::InteropServices::Out] System::Buffers::ReadOnlySequenceSegment<T> ^ % endSegment, [Runtime::InteropServices::Out] int % endIndex);
public static bool TryGetReadOnlySequenceSegment<T> (System.Buffers.ReadOnlySequence<T> sequence, out System.Buffers.ReadOnlySequenceSegment<T>? startSegment, out int startIndex, out System.Buffers.ReadOnlySequenceSegment<T>? endSegment, out int endIndex);
public static bool TryGetReadOnlySequenceSegment<T> (System.Buffers.ReadOnlySequence<T> sequence, out System.Buffers.ReadOnlySequenceSegment<T> startSegment, out int startIndex, out System.Buffers.ReadOnlySequenceSegment<T> endSegment, out int endIndex);
static member TryGetReadOnlySequenceSegment : System.Buffers.ReadOnlySequence<'T> * ReadOnlySequenceSegment * int * ReadOnlySequenceSegment * int -> bool
Public Shared Function TryGetReadOnlySequenceSegment(Of T) (sequence As ReadOnlySequence(Of T), ByRef startSegment As ReadOnlySequenceSegment(Of T), ByRef startIndex As Integer, ByRef endSegment As ReadOnlySequenceSegment(Of T), ByRef endIndex As Integer) As Boolean

Parametri di tipo

T

Tipo della sequenza di sola lettura.

Parametri

sequence
ReadOnlySequence<T>

Sequenza di sola lettura da cui verrà recuperato il segmento di sequenza di sola lettura.

startSegment
ReadOnlySequenceSegment<T>

Segmento di sequenza di sola lettura iniziale.

startIndex
Int32

Posizione iniziale.

endSegment
ReadOnlySequenceSegment<T>

Segmento di sequenza di sola lettura finale.

endIndex
Int32

Posizione finale.

Restituisce

true se è possibile recuperare il segmento di sequenza di sola lettura; in caso contrario, false.

Si applica a