Class ReadOnlySequencePartitioner
Represents factory of Partitioner<TSource> objects for Read
Inherited Members
Namespace: DotNext .Buffers
Assembly: DotNext.dll
Syntax
public static class ReadOnlySequencePartitioner
Methods
| Edit this page View SourceCreatePartitioner<T>(in ReadOnlySequence<T>, bool)
Creates partitioner for the sequence of elements.
Declaration
public static OrderablePartitioner<T> CreatePartitioner<T>(this in ReadOnlySequence<T> sequence, bool splitOnSegments = false)
Parameters
Type | Name | Description |
---|---|---|
Read |
sequence | The sequence of elements. |
bool | splitOnSegments | true to split the sequence to the number of partitions equals to the number of the segments within the sequence; false to split the sequence dynamically to balance the workload. |
Returns
Type | Description |
---|---|
Orderable |
The partitioner for the sequence. |
Type Parameters
Name | Description |
---|---|
T | The type of the elements in the sequence. |