Compartir a través de


SequenceMarshal.TryGetReadOnlySequenceSegment<T> Método

Definición

Intenta recuperar un segmento de secuencia de solo lectura a partir de la secuencia de solo lectura especificada.

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

Parámetros de tipo

T

Tipo de la secuencia de solo lectura.

Parámetros

sequence
ReadOnlySequence<T>

Secuencia de solo lectura a partir de la cual se recuperará el segmento de la secuencia de solo lectura.

startSegment
ReadOnlySequenceSegment<T>

Segmento de la secuencia de solo lectura inicial.

startIndex
Int32

Posición inicial.

endSegment
ReadOnlySequenceSegment<T>

Segmento de la secuencia de solo lectura final.

endIndex
Int32

Posición final.

Devoluciones

true si se puede recuperar el segmento de secuencia de solo lectura; de lo contrario, false.

Se aplica a