Table of Contents

ToPartitioner Method

Definition

Namespace
Cuemon.Extensions.Collections.Generic
Assemblies
Cuemon.Extensions.Collections.Generic.dll
Source
src/Cuemon.Extensions.Collections.Generic/EnumerableExtensions.cs

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

source IEnumerable<T>

An IEnumerable<T> to extend.

partitionSize int

The size of the partitions.

Returns

PartitionerEnumerable<T>

An instance of PartitionerEnumerable<T>.

Type Parameters

T

The type of elements in the source.