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
sourceIEnumerableExpression<T>The source collection
chunkSizeintThe size of the chunks
resultSelectorFunc<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
TThe type of elements
TResultThe 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
sourceIEnumerableExpression<T>The source collection
chunkSizeintThe size of the chunks
resultSelectorFunc<IEnumerableExpression<(T, int)>, int, TResult>A function that converts a collection of elements and the index of the chunk into a new chunk
balancingStrategyProviderIChunkBalancingStrategyProviderA 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
TThe type of elements
TResultThe 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
sourceIEnumerableExpression<T>The source collection
chunkSizeintThe size of the chunks
resultSelectorFunc<IEnumerableExpression<(T, int)>, int, TResult>A function that converts a collection of elements and the index of the chunk into a new chunk
balancingStrategyProviderIChunkBalancingStrategyProvider<(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
TThe type of elements
TResultThe 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
sourceINotifyEnumerable<T>The source collection
chunkSizeintThe size of the chunks
resultSelectorFunc<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
TThe type of elements
TResultThe 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
sourceINotifyEnumerable<T>The source collection
chunkSizeintThe size of the chunks
resultSelectorFunc<IEnumerableExpression<(T, int)>, int, TResult>A function that converts a collection of elements and the index of the chunk into a new chunk
balancingStrategyProviderIChunkBalancingStrategyProviderA 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
TThe type of elements
TResultThe 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
sourceINotifyEnumerable<T>The source collection
chunkSizeintThe size of the chunks
resultSelectorFunc<IEnumerableExpression<(T, int)>, int, TResult>A function that converts a collection of elements and the index of the chunk into a new chunk
balancingStrategyProviderIChunkBalancingStrategyProvider<(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
TThe type of elements
TResultThe 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
sourceIEnumerable<T>The source collection
chunkSizeintThe size of the chunks
resultSelectorFunc<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
TThe type of elements
TResultThe 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
sourceIEnumerableExpression<T>The source collection
chunkSizeintThe size of the chunks
resultSelectorFunc<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
TThe type of elements
TResultThe 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
sourceIEnumerableExpression<T>The source collection
chunkSizeintThe size of the chunks
resultSelectorFunc<IEnumerableExpression<T>, int, TResult>A function that converts a collection of elements and the index of the chunk into a new chunk
balancingStrategyProviderIChunkBalancingStrategyProviderA 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
TThe type of elements
TResultThe 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
sourceIEnumerableExpression<T>The source collection
chunkSizeintThe size of the chunks
resultSelectorFunc<IEnumerableExpression<T>, int, TResult>A function that converts a collection of elements and the index of the chunk into a new chunk
balancingStrategyProviderIChunkBalancingStrategyProvider<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
TThe type of elements
TResultThe 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
sourceINotifyEnumerable<T>The source collection
chunkSizeintThe size of the chunks
resultSelectorFunc<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
TThe type of elements
TResultThe 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
sourceINotifyEnumerable<T>The source collection
chunkSizeintThe size of the chunks
resultSelectorFunc<IEnumerableExpression<T>, int, TResult>A function that converts a collection of elements and the index of the chunk into a new chunk
balancingStrategyProviderIChunkBalancingStrategyProviderA 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
TThe type of elements
TResultThe 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
sourceINotifyEnumerable<T>The source collection
chunkSizeintThe size of the chunks
resultSelectorFunc<IEnumerableExpression<T>, int, TResult>A function that converts a collection of elements and the index of the chunk into a new chunk
balancingStrategyProviderIChunkBalancingStrategyProvider<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
TThe type of elements
TResultThe 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
sourceIEnumerable<T>The source collection
chunkSizeintThe size of the chunks
resultSelectorFunc<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
TThe type of elements
TResultThe type of chunks