SequenceMarshal.TryGetReadOnlySequenceSegment<T>(ReadOnlySequence<T>, ReadOnlySequenceSegment<T>, Int32, ReadOnlySequenceSegment<T>, Int32) メソッド

定義

指定した読み取り専用シーケンスから読み取り専用シーケンス セグメントの取得を試みます。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);
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

型パラメーター

T

読み取り専用シーケンスの型。The type of the read-only sequence.

パラメーター

sequence
ReadOnlySequence<T>

読み取り専用シーケンス セグメントの取得元となる読み取り専用のシーケンス。The read-only sequence from which the read-only sequence segment will be retrieved.

startSegment
ReadOnlySequenceSegment<T>

先頭の読み取り専用シーケンス セグメント。The beginning read-only sequence segment.

startIndex
Int32

最初の位置。The initial position.

endSegment
ReadOnlySequenceSegment<T>

末尾の読み取り専用シーケンス セグメント。The ending read-only sequence segment.

endIndex
Int32

最後の位置。The final position.

戻り値

読み取り専用シーケンス セグメントを取得できる場合は true、それ以外の場合は falsetrue if the read-only sequence segment can be retrieved; otherwise, false.

適用対象