SequenceMarshal.TryGetReadOnlySequenceSegment<T> Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
Type Parameters
- T
The type of the read-only sequence.
Parameters
- 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.
Returns
true
if the read-only sequence segment can be retrieved; otherwise, false
.
Applies to
التعاون معنا على GitHub
يمكن العثور على مصدر هذا المحتوى على GitHub حيث يمكنك أيضاً إضافة مشاكل وطلبات سحب ومراجعتها. للحصول على معلومات إضافية، اطلع على دليل المساهم لدينا.