SequenceMarshal.TryGetReadOnlySequenceSegment<T>(ReadOnlySequence<T>, ReadOnlySequenceSegment<T>, Int32, ReadOnlySequenceSegment<T>, Int32) Método
Definição
Tenta recuperar um segmento de sequência somente leitura da sequência somente leitura especificada.Attempts to retrieve a read-only sequence segment from the specified read-only sequence.
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
O tipo da sequência somente leitura.The type of the read-only sequence.
Parâmetros
- sequence
- ReadOnlySequence<T>
A sequência somente leitura da qual o segmento de sequência somente leitura será recuperado.The read-only sequence from which the read-only sequence segment will be retrieved.
- startSegment
- ReadOnlySequenceSegment<T>
O segmento de sequência somente leitura inicial.The beginning read-only sequence segment.
- startIndex
- Int32
A posição inicial.The initial position.
- endSegment
- ReadOnlySequenceSegment<T>
O segmento de sequência somente leitura final.The ending read-only sequence segment.
- endIndex
- Int32
A posição final.The final position.
Retornos
true se o segmento de sequência somente leitura pode ser recuperado; caso contrário, false.true if the read-only sequence segment can be retrieved; otherwise, false.