ToPartitioner Method
Definition
- Namespace
- Cuemon.Extensions.Collections.Generic
- Assemblies
- Cuemon.Extensions.Collections.Generic.dll
ToPartitioner<T>(IEnumerable<T>, int)
Extends the specified source to support iterating in partitions.
public static PartitionerEnumerable<T> ToPartitioner<T>(this IEnumerable<T> source, int partitionSize = 128)
Parameters
sourceIEnumerable<T>An IEnumerable<T> to extend.
partitionSizeintThe size of the partitions.
Returns
- PartitionerEnumerable<T>
An instance of PartitionerEnumerable<T>.
Type Parameters
TThe type of elements in the
source.