Table of Contents

Class ChunkExtensions

Namespace
NMF.Expressions.Linq
Assembly
NMF.Expressions.Chunk.dll

Denotes chunking extensions

public static class ChunkExtensions
Inheritance
ChunkExtensions
Inherited Members

Methods

ChunkIndexed<T, TResult>(IEnumerableExpression<T>, int, Func<IEnumerableExpression<(T, int)>, int, TResult>)

Chunks the given collection and keeps the index of the elements in the original collection

public static IEnumerableExpression<TResult> ChunkIndexed<T, TResult>(this IEnumerableExpression<T> source, int chunkSize, Func<IEnumerableExpression<(T, int)>, int, TResult> resultSelector)

Parameters

source IEnumerableExpression<T>

The source collection

chunkSize int

The size of the chunks

resultSelector Func<IEnumerableExpression<(T, int)>, int, TResult>

A function that converts a collection of elements and the index of the chunk into a new chunk

Returns

IEnumerableExpression<TResult>

A collection of chunks

Type Parameters

T

The type of elements

TResult

The type of chunks

ChunkIndexed<T, TResult>(IEnumerableExpression<T>, int, Func<IEnumerableExpression<(T, int)>, int, TResult>, IChunkBalancingStrategyProvider)

Chunks the given collection and keeps the index of the elements in the original collection

public static IEnumerableExpression<TResult> ChunkIndexed<T, TResult>(this IEnumerableExpression<T> source, int chunkSize, Func<IEnumerableExpression<(T, int)>, int, TResult> resultSelector, IChunkBalancingStrategyProvider balancingStrategyProvider)

Parameters

source IEnumerableExpression<T>

The source collection

chunkSize int

The size of the chunks

resultSelector Func<IEnumerableExpression<(T, int)>, int, TResult>

A function that converts a collection of elements and the index of the chunk into a new chunk

balancingStrategyProvider IChunkBalancingStrategyProvider

A component that defines how to balance the chunk collection when items are added or deleted in the source collection

Returns

IEnumerableExpression<TResult>

A collection of chunks

Type Parameters

T

The type of elements

TResult

The type of chunks

ChunkIndexed<T, TResult>(IEnumerableExpression<T>, int, Func<IEnumerableExpression<(T, int)>, int, TResult>, IChunkBalancingStrategyProvider<(T, int), TResult>)

Chunks the given collection and keeps the index of the elements in the original collection

public static IEnumerableExpression<TResult> ChunkIndexed<T, TResult>(this IEnumerableExpression<T> source, int chunkSize, Func<IEnumerableExpression<(T, int)>, int, TResult> resultSelector, IChunkBalancingStrategyProvider<(T, int), TResult> balancingStrategyProvider)

Parameters

source IEnumerableExpression<T>

The source collection

chunkSize int

The size of the chunks

resultSelector Func<IEnumerableExpression<(T, int)>, int, TResult>

A function that converts a collection of elements and the index of the chunk into a new chunk

balancingStrategyProvider IChunkBalancingStrategyProvider<(T, int), TResult>

A component that defines how to balance the chunk collection when items are added or deleted in the source collection

Returns

IEnumerableExpression<TResult>

A collection of chunks

Type Parameters

T

The type of elements

TResult

The type of chunks

ChunkIndexed<T, TResult>(INotifyEnumerable<T>, int, Func<IEnumerableExpression<(T, int)>, int, TResult>)

Chunks the given collection and keeps the index of the elements in the original collection

public static INotifyEnumerable<TResult> ChunkIndexed<T, TResult>(this INotifyEnumerable<T> source, int chunkSize, Func<IEnumerableExpression<(T, int)>, int, TResult> resultSelector)

Parameters

source INotifyEnumerable<T>

The source collection

chunkSize int

The size of the chunks

resultSelector Func<IEnumerableExpression<(T, int)>, int, TResult>

A function that converts a collection of elements and the index of the chunk into a new chunk

Returns

INotifyEnumerable<TResult>

A collection of chunks

Type Parameters

T

The type of elements

TResult

The type of chunks

ChunkIndexed<T, TResult>(INotifyEnumerable<T>, int, Func<IEnumerableExpression<(T, int)>, int, TResult>, IChunkBalancingStrategyProvider)

Chunks the given collection and keeps the index of the elements in the original collection

public static INotifyEnumerable<TResult> ChunkIndexed<T, TResult>(this INotifyEnumerable<T> source, int chunkSize, Func<IEnumerableExpression<(T, int)>, int, TResult> resultSelector, IChunkBalancingStrategyProvider balancingStrategyProvider)

Parameters

source INotifyEnumerable<T>

The source collection

chunkSize int

The size of the chunks

resultSelector Func<IEnumerableExpression<(T, int)>, int, TResult>

A function that converts a collection of elements and the index of the chunk into a new chunk

balancingStrategyProvider IChunkBalancingStrategyProvider

A component that defines how to balance the chunk collection when items are added or deleted in the source collection

Returns

INotifyEnumerable<TResult>

A collection of chunks

Type Parameters

T

The type of elements

TResult

The type of chunks

ChunkIndexed<T, TResult>(INotifyEnumerable<T>, int, Func<IEnumerableExpression<(T, int)>, int, TResult>, IChunkBalancingStrategyProvider<(T, int), TResult>)

Chunks the given collection and keeps the index of the elements in the original collection

public static INotifyEnumerable<TResult> ChunkIndexed<T, TResult>(this INotifyEnumerable<T> source, int chunkSize, Func<IEnumerableExpression<(T, int)>, int, TResult> resultSelector, IChunkBalancingStrategyProvider<(T, int), TResult> balancingStrategyProvider)

Parameters

source INotifyEnumerable<T>

The source collection

chunkSize int

The size of the chunks

resultSelector Func<IEnumerableExpression<(T, int)>, int, TResult>

A function that converts a collection of elements and the index of the chunk into a new chunk

balancingStrategyProvider IChunkBalancingStrategyProvider<(T, int), TResult>

A component that defines how to balance the chunk collection when items are added or deleted in the source collection

Returns

INotifyEnumerable<TResult>

A collection of chunks

Type Parameters

T

The type of elements

TResult

The type of chunks

ChunkIndexed<T, TResult>(IEnumerable<T>, int, Func<IEnumerableExpression<(T, int)>, int, TResult>)

Chunks the given collection and keeps the index of the elements in the original collection

public static IEnumerable<TResult> ChunkIndexed<T, TResult>(this IEnumerable<T> source, int chunkSize, Func<IEnumerableExpression<(T, int)>, int, TResult> resultSelector)

Parameters

source IEnumerable<T>

The source collection

chunkSize int

The size of the chunks

resultSelector Func<IEnumerableExpression<(T, int)>, int, TResult>

A function that converts a collection of elements and the index of the chunk into a new chunk

Returns

IEnumerable<TResult>

A collection of chunks

Type Parameters

T

The type of elements

TResult

The type of chunks

Chunk<T, TResult>(IEnumerableExpression<T>, int, Func<IEnumerableExpression<T>, int, TResult>)

Chunks the given collection

public static IEnumerableExpression<TResult> Chunk<T, TResult>(this IEnumerableExpression<T> source, int chunkSize, Func<IEnumerableExpression<T>, int, TResult> resultSelector)

Parameters

source IEnumerableExpression<T>

The source collection

chunkSize int

The size of the chunks

resultSelector Func<IEnumerableExpression<T>, int, TResult>

A function that converts a collection of elements and the index of the chunk into a new chunk

Returns

IEnumerableExpression<TResult>

A collection of chunks

Type Parameters

T

The type of elements

TResult

The type of chunks

Chunk<T, TResult>(IEnumerableExpression<T>, int, Func<IEnumerableExpression<T>, int, TResult>, IChunkBalancingStrategyProvider)

Chunks the given collection

public static IEnumerableExpression<TResult> Chunk<T, TResult>(this IEnumerableExpression<T> source, int chunkSize, Func<IEnumerableExpression<T>, int, TResult> resultSelector, IChunkBalancingStrategyProvider balancingStrategyProvider)

Parameters

source IEnumerableExpression<T>

The source collection

chunkSize int

The size of the chunks

resultSelector Func<IEnumerableExpression<T>, int, TResult>

A function that converts a collection of elements and the index of the chunk into a new chunk

balancingStrategyProvider IChunkBalancingStrategyProvider

A component that defines how to balance the chunk collection when items are added or deleted in the source collection

Returns

IEnumerableExpression<TResult>

A collection of chunks

Type Parameters

T

The type of elements

TResult

The type of chunks

Chunk<T, TResult>(IEnumerableExpression<T>, int, Func<IEnumerableExpression<T>, int, TResult>, IChunkBalancingStrategyProvider<T, TResult>)

Chunks the given collection

public static IEnumerableExpression<TResult> Chunk<T, TResult>(this IEnumerableExpression<T> source, int chunkSize, Func<IEnumerableExpression<T>, int, TResult> resultSelector, IChunkBalancingStrategyProvider<T, TResult> balancingStrategyProvider)

Parameters

source IEnumerableExpression<T>

The source collection

chunkSize int

The size of the chunks

resultSelector Func<IEnumerableExpression<T>, int, TResult>

A function that converts a collection of elements and the index of the chunk into a new chunk

balancingStrategyProvider IChunkBalancingStrategyProvider<T, TResult>

A component that defines how to balance the chunk collection when items are added or deleted in the source collection

Returns

IEnumerableExpression<TResult>

A collection of chunks

Type Parameters

T

The type of elements

TResult

The type of chunks

Chunk<T, TResult>(INotifyEnumerable<T>, int, Func<IEnumerableExpression<T>, int, TResult>)

Chunks the given collection

public static INotifyEnumerable<TResult> Chunk<T, TResult>(this INotifyEnumerable<T> source, int chunkSize, Func<IEnumerableExpression<T>, int, TResult> resultSelector)

Parameters

source INotifyEnumerable<T>

The source collection

chunkSize int

The size of the chunks

resultSelector Func<IEnumerableExpression<T>, int, TResult>

A function that converts a collection of elements and the index of the chunk into a new chunk

Returns

INotifyEnumerable<TResult>

A collection of chunks

Type Parameters

T

The type of elements

TResult

The type of chunks

Chunk<T, TResult>(INotifyEnumerable<T>, int, Func<IEnumerableExpression<T>, int, TResult>, IChunkBalancingStrategyProvider)

Chunks the given collection

public static INotifyEnumerable<TResult> Chunk<T, TResult>(this INotifyEnumerable<T> source, int chunkSize, Func<IEnumerableExpression<T>, int, TResult> resultSelector, IChunkBalancingStrategyProvider balancingStrategyProvider)

Parameters

source INotifyEnumerable<T>

The source collection

chunkSize int

The size of the chunks

resultSelector Func<IEnumerableExpression<T>, int, TResult>

A function that converts a collection of elements and the index of the chunk into a new chunk

balancingStrategyProvider IChunkBalancingStrategyProvider

A component that defines how to balance the chunk collection when items are added or deleted in the source collection

Returns

INotifyEnumerable<TResult>

A collection of chunks

Type Parameters

T

The type of elements

TResult

The type of chunks

Chunk<T, TResult>(INotifyEnumerable<T>, int, Func<IEnumerableExpression<T>, int, TResult>, IChunkBalancingStrategyProvider<T, TResult>)

Chunks the given collection

public static INotifyEnumerable<TResult> Chunk<T, TResult>(this INotifyEnumerable<T> source, int chunkSize, Func<IEnumerableExpression<T>, int, TResult> resultSelector, IChunkBalancingStrategyProvider<T, TResult> balancingStrategyProvider)

Parameters

source INotifyEnumerable<T>

The source collection

chunkSize int

The size of the chunks

resultSelector Func<IEnumerableExpression<T>, int, TResult>

A function that converts a collection of elements and the index of the chunk into a new chunk

balancingStrategyProvider IChunkBalancingStrategyProvider<T, TResult>

A component that defines how to balance the chunk collection when items are added or deleted in the source collection

Returns

INotifyEnumerable<TResult>

A collection of chunks

Type Parameters

T

The type of elements

TResult

The type of chunks

Chunk<T, TResult>(IEnumerable<T>, int, Func<IEnumerableExpression<T>, int, TResult>)

Chunks the given collection

public static IEnumerable<TResult> Chunk<T, TResult>(this IEnumerable<T> source, int chunkSize, Func<IEnumerableExpression<T>, int, TResult> resultSelector)

Parameters

source IEnumerable<T>

The source collection

chunkSize int

The size of the chunks

resultSelector Func<IEnumerableExpression<T>, int, TResult>

A function that converts a collection of elements and the index of the chunk into a new chunk

Returns

IEnumerable<TResult>

A collection of chunks

Type Parameters

T

The type of elements

TResult

The type of chunks