Show / Hide Table of Contents

Class ChunkExtensions

Denotes chunking extensions

Inheritance
object
ChunkExtensions
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: NMF.Expressions.Linq
Assembly: NMF.Expressions.Chunk.dll
Syntax
public static class ChunkExtensions

Methods

| Edit this page View Source

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

Declaration
public static IEnumerableExpression<TResult> ChunkIndexed<T, TResult>(this IEnumerableExpression<T> source, int chunkSize, Func<IEnumerableExpression<(T, int)>, int, TResult> resultSelector)
Parameters
Type Name Description
IEnumerableExpression<T> source

The source collection

int chunkSize

The size of the chunks

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

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

Returns
Type Description
IEnumerableExpression<TResult>

A collection of chunks

Type Parameters
Name Description
T

The type of elements

TResult

The type of chunks

| Edit this page View Source

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

Declaration
public static IEnumerableExpression<TResult> ChunkIndexed<T, TResult>(this IEnumerableExpression<T> source, int chunkSize, Func<IEnumerableExpression<(T, int)>, int, TResult> resultSelector, IChunkBalancingStrategyProvider balancingStrategyProvider)
Parameters
Type Name Description
IEnumerableExpression<T> source

The source collection

int chunkSize

The size of the chunks

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

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

IChunkBalancingStrategyProvider balancingStrategyProvider

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

Returns
Type Description
IEnumerableExpression<TResult>

A collection of chunks

Type Parameters
Name Description
T

The type of elements

TResult

The type of chunks

| Edit this page View Source

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

Declaration
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
Type Name Description
IEnumerableExpression<T> source

The source collection

int chunkSize

The size of the chunks

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

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

IChunkBalancingStrategyProvider<(T, int), TResult> balancingStrategyProvider

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

Returns
Type Description
IEnumerableExpression<TResult>

A collection of chunks

Type Parameters
Name Description
T

The type of elements

TResult

The type of chunks

| Edit this page View Source

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

Declaration
public static INotifyEnumerable<TResult> ChunkIndexed<T, TResult>(this INotifyEnumerable<T> source, int chunkSize, Func<IEnumerableExpression<(T, int)>, int, TResult> resultSelector)
Parameters
Type Name Description
INotifyEnumerable<T> source

The source collection

int chunkSize

The size of the chunks

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

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

Returns
Type Description
INotifyEnumerable<TResult>

A collection of chunks

Type Parameters
Name Description
T

The type of elements

TResult

The type of chunks

| Edit this page View Source

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

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

The source collection

int chunkSize

The size of the chunks

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

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

IChunkBalancingStrategyProvider balancingStrategyProvider

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

Returns
Type Description
INotifyEnumerable<TResult>

A collection of chunks

Type Parameters
Name Description
T

The type of elements

TResult

The type of chunks

| Edit this page View Source

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

Declaration
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
Type Name Description
INotifyEnumerable<T> source

The source collection

int chunkSize

The size of the chunks

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

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

IChunkBalancingStrategyProvider<(T, int), TResult> balancingStrategyProvider

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

Returns
Type Description
INotifyEnumerable<TResult>

A collection of chunks

Type Parameters
Name Description
T

The type of elements

TResult

The type of chunks

| Edit this page View Source

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

Declaration
public static IEnumerable<TResult> ChunkIndexed<T, TResult>(this IEnumerable<T> source, int chunkSize, Func<IEnumerableExpression<(T, int)>, int, TResult> resultSelector)
Parameters
Type Name Description
IEnumerable<T> source

The source collection

int chunkSize

The size of the chunks

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

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

Returns
Type Description
IEnumerable<TResult>

A collection of chunks

Type Parameters
Name Description
T

The type of elements

TResult

The type of chunks

| Edit this page View Source

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

Chunks the given collection

Declaration
public static IEnumerableExpression<TResult> Chunk<T, TResult>(this IEnumerableExpression<T> source, int chunkSize, Func<IEnumerableExpression<T>, int, TResult> resultSelector)
Parameters
Type Name Description
IEnumerableExpression<T> source

The source collection

int chunkSize

The size of the chunks

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

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

Returns
Type Description
IEnumerableExpression<TResult>

A collection of chunks

Type Parameters
Name Description
T

The type of elements

TResult

The type of chunks

| Edit this page View Source

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

Chunks the given collection

Declaration
public static IEnumerableExpression<TResult> Chunk<T, TResult>(this IEnumerableExpression<T> source, int chunkSize, Func<IEnumerableExpression<T>, int, TResult> resultSelector, IChunkBalancingStrategyProvider balancingStrategyProvider)
Parameters
Type Name Description
IEnumerableExpression<T> source

The source collection

int chunkSize

The size of the chunks

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

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

IChunkBalancingStrategyProvider balancingStrategyProvider

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

Returns
Type Description
IEnumerableExpression<TResult>

A collection of chunks

Type Parameters
Name Description
T

The type of elements

TResult

The type of chunks

| Edit this page View Source

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

Chunks the given collection

Declaration
public static IEnumerableExpression<TResult> Chunk<T, TResult>(this IEnumerableExpression<T> source, int chunkSize, Func<IEnumerableExpression<T>, int, TResult> resultSelector, IChunkBalancingStrategyProvider<T, TResult> balancingStrategyProvider)
Parameters
Type Name Description
IEnumerableExpression<T> source

The source collection

int chunkSize

The size of the chunks

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

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

IChunkBalancingStrategyProvider<T, TResult> balancingStrategyProvider

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

Returns
Type Description
IEnumerableExpression<TResult>

A collection of chunks

Type Parameters
Name Description
T

The type of elements

TResult

The type of chunks

| Edit this page View Source

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

Chunks the given collection

Declaration
public static INotifyEnumerable<TResult> Chunk<T, TResult>(this INotifyEnumerable<T> source, int chunkSize, Func<IEnumerableExpression<T>, int, TResult> resultSelector)
Parameters
Type Name Description
INotifyEnumerable<T> source

The source collection

int chunkSize

The size of the chunks

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

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

Returns
Type Description
INotifyEnumerable<TResult>

A collection of chunks

Type Parameters
Name Description
T

The type of elements

TResult

The type of chunks

| Edit this page View Source

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

Chunks the given collection

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

The source collection

int chunkSize

The size of the chunks

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

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

IChunkBalancingStrategyProvider balancingStrategyProvider

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

Returns
Type Description
INotifyEnumerable<TResult>

A collection of chunks

Type Parameters
Name Description
T

The type of elements

TResult

The type of chunks

| Edit this page View Source

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

Chunks the given collection

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

The source collection

int chunkSize

The size of the chunks

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

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

IChunkBalancingStrategyProvider<T, TResult> balancingStrategyProvider

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

Returns
Type Description
INotifyEnumerable<TResult>

A collection of chunks

Type Parameters
Name Description
T

The type of elements

TResult

The type of chunks

| Edit this page View Source

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

Chunks the given collection

Declaration
public static IEnumerable<TResult> Chunk<T, TResult>(this IEnumerable<T> source, int chunkSize, Func<IEnumerableExpression<T>, int, TResult> resultSelector)
Parameters
Type Name Description
IEnumerable<T> source

The source collection

int chunkSize

The size of the chunks

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

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

Returns
Type Description
IEnumerable<TResult>

A collection of chunks

Type Parameters
Name Description
T

The type of elements

TResult

The type of chunks

  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX