Table of Contents

Class ParallelFactory

Namespace
Cuemon.Threading
Assembly
Cuemon.Threading.dll

Provides a factory based way to encapsulate and re-use existing code while adding support for typically long-running parallel loops and regions.

public static class ParallelFactory
Inheritance
ParallelFactory

Methods

For(Int32, Int32, Action<Int32>, Action<AsyncTaskFactoryOptions>)

Executes a parallel for loop.

public static void For(int fromInclusive, int toExclusive, Action<int> worker, Action<AsyncTaskFactoryOptions> setup = null)

Parameters

fromInclusive Int32

The start index, inclusive.

toExclusive Int32

The end index, exclusive.

worker Action<Int32>

The delegate that is invoked once per iteration.

setup Action<AsyncTaskFactoryOptions>

The AsyncTaskFactoryOptions which may be configured.

For(Int64, Int64, Action<Int64>, Action<AsyncTaskFactoryOptions>)

Executes a parallel for loop.

public static void For(long fromInclusive, long toExclusive, Action<long> worker, Action<AsyncTaskFactoryOptions> setup = null)

Parameters

fromInclusive Int64

The start index, inclusive.

toExclusive Int64

The end index, exclusive.

worker Action<Int64>

The delegate that is invoked once per iteration.

setup Action<AsyncTaskFactoryOptions>

The AsyncTaskFactoryOptions which may be configured.

For<T>(Int32, Int32, Action<Int32, T>, T, Action<AsyncTaskFactoryOptions>)

Executes a parallel for loop.

public static void For<T>(int fromInclusive, int toExclusive, Action<int, T> worker, T arg, Action<AsyncTaskFactoryOptions> setup = null)

Parameters

fromInclusive Int32

The start index, inclusive.

toExclusive Int32

The end index, exclusive.

worker Action<Int32, T>

The delegate that is invoked once per iteration.

arg T

The parameter of the delegate worker.

setup Action<AsyncTaskFactoryOptions>

The AsyncTaskFactoryOptions which may be configured.

Type Parameters

T

The type of the parameter of the delegate worker.

For<T>(Int64, Int64, Action<Int64, T>, T, Action<AsyncTaskFactoryOptions>)

Executes a parallel for loop.

public static void For<T>(long fromInclusive, long toExclusive, Action<long, T> worker, T arg, Action<AsyncTaskFactoryOptions> setup = null)

Parameters

fromInclusive Int64

The start index, inclusive.

toExclusive Int64

The end index, exclusive.

worker Action<Int64, T>

The delegate that is invoked once per iteration.

arg T

The parameter of the delegate worker.

setup Action<AsyncTaskFactoryOptions>

The AsyncTaskFactoryOptions which may be configured.

Type Parameters

T

The type of the parameter of the delegate worker.

For<T1, T2>(Int32, Int32, Action<Int32, T1, T2>, T1, T2, Action<AsyncTaskFactoryOptions>)

Executes a parallel for loop.

public static void For<T1, T2>(int fromInclusive, int toExclusive, Action<int, T1, T2> worker, T1 arg1, T2 arg2, Action<AsyncTaskFactoryOptions> setup = null)

Parameters

fromInclusive Int32

The start index, inclusive.

toExclusive Int32

The end index, exclusive.

worker Action<Int32, T1, T2>

The delegate that is invoked once per iteration.

arg1 T1

The first parameter of the delegate worker.

arg2 T2

The second parameter of the delegate worker.

setup Action<AsyncTaskFactoryOptions>

The AsyncTaskFactoryOptions which may be configured.

Type Parameters

T1

The type of the first parameter of the delegate worker.

T2

The type of the second parameter of the delegate worker.

For<T1, T2>(Int64, Int64, Action<Int64, T1, T2>, T1, T2, Action<AsyncTaskFactoryOptions>)

Executes a parallel for loop.

public static void For<T1, T2>(long fromInclusive, long toExclusive, Action<long, T1, T2> worker, T1 arg1, T2 arg2, Action<AsyncTaskFactoryOptions> setup = null)

Parameters

fromInclusive Int64

The start index, inclusive.

toExclusive Int64

The end index, exclusive.

worker Action<Int64, T1, T2>

The delegate that is invoked once per iteration.

arg1 T1

The first parameter of the delegate worker.

arg2 T2

The second parameter of the delegate worker.

setup Action<AsyncTaskFactoryOptions>

The AsyncTaskFactoryOptions which may be configured.

Type Parameters

T1

The type of the first parameter of the delegate worker.

T2

The type of the second parameter of the delegate worker.

For<T1, T2, T3>(Int32, Int32, Action<Int32, T1, T2, T3>, T1, T2, T3, Action<AsyncTaskFactoryOptions>)

Executes a parallel for loop.

public static void For<T1, T2, T3>(int fromInclusive, int toExclusive, Action<int, T1, T2, T3> worker, T1 arg1, T2 arg2, T3 arg3, Action<AsyncTaskFactoryOptions> setup = null)

Parameters

fromInclusive Int32

The start index, inclusive.

toExclusive Int32

The end index, exclusive.

worker Action<Int32, T1, T2, T3>

The delegate that is invoked once per iteration.

arg1 T1

The first parameter of the delegate worker.

arg2 T2

The second parameter of the delegate worker.

arg3 T3

The third parameter of the delegate worker.

setup Action<AsyncTaskFactoryOptions>

The AsyncTaskFactoryOptions which may be configured.

Type Parameters

T1

The type of the first parameter of the delegate worker.

T2

The type of the second parameter of the delegate worker.

T3

The type of the third parameter of the delegate worker.

For<T1, T2, T3>(Int64, Int64, Action<Int64, T1, T2, T3>, T1, T2, T3, Action<AsyncTaskFactoryOptions>)

Executes a parallel for loop.

public static void For<T1, T2, T3>(long fromInclusive, long toExclusive, Action<long, T1, T2, T3> worker, T1 arg1, T2 arg2, T3 arg3, Action<AsyncTaskFactoryOptions> setup = null)

Parameters

fromInclusive Int64

The start index, inclusive.

toExclusive Int64

The end index, exclusive.

worker Action<Int64, T1, T2, T3>

The delegate that is invoked once per iteration.

arg1 T1

The first parameter of the delegate worker.

arg2 T2

The second parameter of the delegate worker.

arg3 T3

The third parameter of the delegate worker.

setup Action<AsyncTaskFactoryOptions>

The AsyncTaskFactoryOptions which may be configured.

Type Parameters

T1

The type of the first parameter of the delegate worker.

T2

The type of the second parameter of the delegate worker.

T3

The type of the third parameter of the delegate worker.

For<T1, T2, T3, T4>(Int32, Int32, Action<Int32, T1, T2, T3, T4>, T1, T2, T3, T4, Action<AsyncTaskFactoryOptions>)

Executes a parallel for loop.

public static void For<T1, T2, T3, T4>(int fromInclusive, int toExclusive, Action<int, T1, T2, T3, T4> worker, T1 arg1, T2 arg2, T3 arg3, T4 arg4, Action<AsyncTaskFactoryOptions> setup = null)

Parameters

fromInclusive Int32

The start index, inclusive.

toExclusive Int32

The end index, exclusive.

worker Action<Int32, T1, T2, T3, T4>

The delegate that is invoked once per iteration.

arg1 T1

The first parameter of the delegate worker.

arg2 T2

The second parameter of the delegate worker.

arg3 T3

The third parameter of the delegate worker.

arg4 T4

The fourth parameter of the delegate worker.

setup Action<AsyncTaskFactoryOptions>

The AsyncTaskFactoryOptions which may be configured.

Type Parameters

T1

The type of the first parameter of the delegate worker.

T2

The type of the second parameter of the delegate worker.

T3

The type of the third parameter of the delegate worker.

T4

The type of the fourth parameter of the delegate worker.

For<T1, T2, T3, T4>(Int64, Int64, Action<Int64, T1, T2, T3, T4>, T1, T2, T3, T4, Action<AsyncTaskFactoryOptions>)

Executes a parallel for loop.

public static void For<T1, T2, T3, T4>(long fromInclusive, long toExclusive, Action<long, T1, T2, T3, T4> worker, T1 arg1, T2 arg2, T3 arg3, T4 arg4, Action<AsyncTaskFactoryOptions> setup = null)

Parameters

fromInclusive Int64

The start index, inclusive.

toExclusive Int64

The end index, exclusive.

worker Action<Int64, T1, T2, T3, T4>

The delegate that is invoked once per iteration.

arg1 T1

The first parameter of the delegate worker.

arg2 T2

The second parameter of the delegate worker.

arg3 T3

The third parameter of the delegate worker.

arg4 T4

The fourth parameter of the delegate worker.

setup Action<AsyncTaskFactoryOptions>

The AsyncTaskFactoryOptions which may be configured.

Type Parameters

T1

The type of the first parameter of the delegate worker.

T2

The type of the second parameter of the delegate worker.

T3

The type of the third parameter of the delegate worker.

T4

The type of the fourth parameter of the delegate worker.

For<T1, T2, T3, T4, T5>(Int32, Int32, Action<Int32, T1, T2, T3, T4, T5>, T1, T2, T3, T4, T5, Action<AsyncTaskFactoryOptions>)

Executes a parallel for loop.

public static void For<T1, T2, T3, T4, T5>(int fromInclusive, int toExclusive, Action<int, T1, T2, T3, T4, T5> worker, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, Action<AsyncTaskFactoryOptions> setup = null)

Parameters

fromInclusive Int32

The start index, inclusive.

toExclusive Int32

The end index, exclusive.

worker Action<Int32, T1, T2, T3, T4, T5>

The delegate that is invoked once per iteration.

arg1 T1

The first parameter of the delegate worker.

arg2 T2

The second parameter of the delegate worker.

arg3 T3

The third parameter of the delegate worker.

arg4 T4

The fourth parameter of the delegate worker.

arg5 T5

The fifth parameter of the delegate worker.

setup Action<AsyncTaskFactoryOptions>

The AsyncTaskFactoryOptions which may be configured.

Type Parameters

T1

The type of the first parameter of the delegate worker.

T2

The type of the second parameter of the delegate worker.

T3

The type of the third parameter of the delegate worker.

T4

The type of the fourth parameter of the delegate worker.

T5

The type of the fifth parameter of the delegate worker.

For<T1, T2, T3, T4, T5>(Int64, Int64, Action<Int64, T1, T2, T3, T4, T5>, T1, T2, T3, T4, T5, Action<AsyncTaskFactoryOptions>)

Executes a parallel for loop.

public static void For<T1, T2, T3, T4, T5>(long fromInclusive, long toExclusive, Action<long, T1, T2, T3, T4, T5> worker, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, Action<AsyncTaskFactoryOptions> setup = null)

Parameters

fromInclusive Int64

The start index, inclusive.

toExclusive Int64

The end index, exclusive.

worker Action<Int64, T1, T2, T3, T4, T5>

The delegate that is invoked once per iteration.

arg1 T1

The first parameter of the delegate worker.

arg2 T2

The second parameter of the delegate worker.

arg3 T3

The third parameter of the delegate worker.

arg4 T4

The fourth parameter of the delegate worker.

arg5 T5

The fifth parameter of the delegate worker.

setup Action<AsyncTaskFactoryOptions>

The AsyncTaskFactoryOptions which may be configured.

Type Parameters

T1

The type of the first parameter of the delegate worker.

T2

The type of the second parameter of the delegate worker.

T3

The type of the third parameter of the delegate worker.

T4

The type of the fourth parameter of the delegate worker.

T5

The type of the fifth parameter of the delegate worker.

ForAsync(Int32, Int32, Func<Int32, CancellationToken, Task>, Action<AsyncWorkloadOptions>)

Executes a parallel for loop.

public static Task ForAsync(int fromInclusive, int toExclusive, Func<int, CancellationToken, Task> worker, Action<AsyncWorkloadOptions> setup = null)

Parameters

fromInclusive Int32

The start index, inclusive.

toExclusive Int32

The end index, exclusive.

worker Func<Int32, CancellationToken, Task>

The delegate that is invoked once per iteration.

setup Action<AsyncWorkloadOptions>

The AsyncWorkloadOptions which may be configured.

Returns

Task

A Task that represents the asynchronous operation.

ForAsync(Int64, Int64, Func<Int64, CancellationToken, Task>, Action<AsyncWorkloadOptions>)

Executes a parallel for loop.

public static Task ForAsync(long fromInclusive, long toExclusive, Func<long, CancellationToken, Task> worker, Action<AsyncWorkloadOptions> setup = null)

Parameters

fromInclusive Int64

The start index, inclusive.

toExclusive Int64

The end index, exclusive.

worker Func<Int64, CancellationToken, Task>

The delegate that is invoked once per iteration.

setup Action<AsyncWorkloadOptions>

The AsyncWorkloadOptions which may be configured.

Returns

Task

A Task that represents the asynchronous operation.

ForAsync<T>(Int32, Int32, Func<Int32, T, CancellationToken, Task>, T, Action<AsyncWorkloadOptions>)

Executes a parallel for loop.

public static Task ForAsync<T>(int fromInclusive, int toExclusive, Func<int, T, CancellationToken, Task> worker, T arg, Action<AsyncWorkloadOptions> setup = null)

Parameters

fromInclusive Int32

The start index, inclusive.

toExclusive Int32

The end index, exclusive.

worker Func<Int32, T, CancellationToken, Task>

The delegate that is invoked once per iteration.

arg T

The parameter of the delegate worker.

setup Action<AsyncWorkloadOptions>

The AsyncWorkloadOptions which may be configured.

Returns

Task

A Task that represents the asynchronous operation.

Type Parameters

T

The type of the parameter of the delegate worker.

ForAsync<T>(Int64, Int64, Func<Int64, T, CancellationToken, Task>, T, Action<AsyncWorkloadOptions>)

Executes a parallel for loop.

public static Task ForAsync<T>(long fromInclusive, long toExclusive, Func<long, T, CancellationToken, Task> worker, T arg, Action<AsyncWorkloadOptions> setup = null)

Parameters

fromInclusive Int64

The start index, inclusive.

toExclusive Int64

The end index, exclusive.

worker Func<Int64, T, CancellationToken, Task>

The delegate that is invoked once per iteration.

arg T

The parameter of the delegate worker.

setup Action<AsyncWorkloadOptions>

The AsyncWorkloadOptions which may be configured.

Returns

Task

A Task that represents the asynchronous operation.

Type Parameters

T

The type of the parameter of the delegate worker.

ForAsync<T1, T2>(Int32, Int32, Func<Int32, T1, T2, CancellationToken, Task>, T1, T2, Action<AsyncWorkloadOptions>)

Executes a parallel for loop.

public static Task ForAsync<T1, T2>(int fromInclusive, int toExclusive, Func<int, T1, T2, CancellationToken, Task> worker, T1 arg1, T2 arg2, Action<AsyncWorkloadOptions> setup = null)

Parameters

fromInclusive Int32

The start index, inclusive.

toExclusive Int32

The end index, exclusive.

worker Func<Int32, T1, T2, CancellationToken, Task>

The delegate that is invoked once per iteration.

arg1 T1

The first parameter of the delegate worker.

arg2 T2

The second parameter of the delegate worker.

setup Action<AsyncWorkloadOptions>

The AsyncWorkloadOptions which may be configured.

Returns

Task

A Task that represents the asynchronous operation.

Type Parameters

T1

The type of the first parameter of the delegate worker.

T2

The type of the second parameter of the delegate worker.

ForAsync<T1, T2>(Int64, Int64, Func<Int64, T1, T2, CancellationToken, Task>, T1, T2, Action<AsyncWorkloadOptions>)

Executes a parallel for loop.

public static Task ForAsync<T1, T2>(long fromInclusive, long toExclusive, Func<long, T1, T2, CancellationToken, Task> worker, T1 arg1, T2 arg2, Action<AsyncWorkloadOptions> setup = null)

Parameters

fromInclusive Int64

The start index, inclusive.

toExclusive Int64

The end index, exclusive.

worker Func<Int64, T1, T2, CancellationToken, Task>

The delegate that is invoked once per iteration.

arg1 T1

The first parameter of the delegate worker.

arg2 T2

The second parameter of the delegate worker.

setup Action<AsyncWorkloadOptions>

The AsyncWorkloadOptions which may be configured.

Returns

Task

A Task that represents the asynchronous operation.

Type Parameters

T1

The type of the first parameter of the delegate worker.

T2

The type of the second parameter of the delegate worker.

ForAsync<T1, T2, T3>(Int32, Int32, Func<Int32, T1, T2, T3, CancellationToken, Task>, T1, T2, T3, Action<AsyncWorkloadOptions>)

Executes a parallel for loop.

public static Task ForAsync<T1, T2, T3>(int fromInclusive, int toExclusive, Func<int, T1, T2, T3, CancellationToken, Task> worker, T1 arg1, T2 arg2, T3 arg3, Action<AsyncWorkloadOptions> setup = null)

Parameters

fromInclusive Int32

The start index, inclusive.

toExclusive Int32

The end index, exclusive.

worker Func<Int32, T1, T2, T3, CancellationToken, Task>

The delegate that is invoked once per iteration.

arg1 T1

The first parameter of the delegate worker.

arg2 T2

The second parameter of the delegate worker.

arg3 T3

The third parameter of the delegate worker.

setup Action<AsyncWorkloadOptions>

The AsyncWorkloadOptions which may be configured.

Returns

Task

A Task that represents the asynchronous operation.

Type Parameters

T1

The type of the first parameter of the delegate worker.

T2

The type of the second parameter of the delegate worker.

T3

The type of the third parameter of the delegate worker.

ForAsync<T1, T2, T3>(Int64, Int64, Func<Int64, T1, T2, T3, CancellationToken, Task>, T1, T2, T3, Action<AsyncWorkloadOptions>)

Executes a parallel for loop.

public static Task ForAsync<T1, T2, T3>(long fromInclusive, long toExclusive, Func<long, T1, T2, T3, CancellationToken, Task> worker, T1 arg1, T2 arg2, T3 arg3, Action<AsyncWorkloadOptions> setup = null)

Parameters

fromInclusive Int64

The start index, inclusive.

toExclusive Int64

The end index, exclusive.

worker Func<Int64, T1, T2, T3, CancellationToken, Task>

The delegate that is invoked once per iteration.

arg1 T1

The first parameter of the delegate worker.

arg2 T2

The second parameter of the delegate worker.

arg3 T3

The third parameter of the delegate worker.

setup Action<AsyncWorkloadOptions>

The AsyncWorkloadOptions which may be configured.

Returns

Task

A Task that represents the asynchronous operation.

Type Parameters

T1

The type of the first parameter of the delegate worker.

T2

The type of the second parameter of the delegate worker.

T3

The type of the third parameter of the delegate worker.

ForAsync<T1, T2, T3, T4>(Int32, Int32, Func<Int32, T1, T2, T3, T4, CancellationToken, Task>, T1, T2, T3, T4, Action<AsyncWorkloadOptions>)

Executes a parallel for loop.

public static Task ForAsync<T1, T2, T3, T4>(int fromInclusive, int toExclusive, Func<int, T1, T2, T3, T4, CancellationToken, Task> worker, T1 arg1, T2 arg2, T3 arg3, T4 arg4, Action<AsyncWorkloadOptions> setup = null)

Parameters

fromInclusive Int32

The start index, inclusive.

toExclusive Int32

The end index, exclusive.

worker Func<Int32, T1, T2, T3, T4, CancellationToken, Task>

The delegate that is invoked once per iteration.

arg1 T1

The first parameter of the delegate worker.

arg2 T2

The second parameter of the delegate worker.

arg3 T3

The third parameter of the delegate worker.

arg4 T4

The fourth parameter of the delegate worker.

setup Action<AsyncWorkloadOptions>

The AsyncWorkloadOptions which may be configured.

Returns

Task

A Task that represents the asynchronous operation.

Type Parameters

T1

The type of the first parameter of the delegate worker.

T2

The type of the second parameter of the delegate worker.

T3

The type of the third parameter of the delegate worker.

T4

The type of the fourth parameter of the delegate worker.

ForAsync<T1, T2, T3, T4>(Int64, Int64, Func<Int64, T1, T2, T3, T4, CancellationToken, Task>, T1, T2, T3, T4, Action<AsyncWorkloadOptions>)

Executes a parallel for loop.

public static Task ForAsync<T1, T2, T3, T4>(long fromInclusive, long toExclusive, Func<long, T1, T2, T3, T4, CancellationToken, Task> worker, T1 arg1, T2 arg2, T3 arg3, T4 arg4, Action<AsyncWorkloadOptions> setup = null)

Parameters

fromInclusive Int64

The start index, inclusive.

toExclusive Int64

The end index, exclusive.

worker Func<Int64, T1, T2, T3, T4, CancellationToken, Task>

The delegate that is invoked once per iteration.

arg1 T1

The first parameter of the delegate worker.

arg2 T2

The second parameter of the delegate worker.

arg3 T3

The third parameter of the delegate worker.

arg4 T4

The fourth parameter of the delegate worker.

setup Action<AsyncWorkloadOptions>

The AsyncWorkloadOptions which may be configured.

Returns

Task

A Task that represents the asynchronous operation.

Type Parameters

T1

The type of the first parameter of the delegate worker.

T2

The type of the second parameter of the delegate worker.

T3

The type of the third parameter of the delegate worker.

T4

The type of the fourth parameter of the delegate worker.

ForAsync<T1, T2, T3, T4, T5>(Int32, Int32, Func<Int32, T1, T2, T3, T4, T5, CancellationToken, Task>, T1, T2, T3, T4, T5, Action<AsyncWorkloadOptions>)

Executes a parallel for loop.

public static Task ForAsync<T1, T2, T3, T4, T5>(int fromInclusive, int toExclusive, Func<int, T1, T2, T3, T4, T5, CancellationToken, Task> worker, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, Action<AsyncWorkloadOptions> setup = null)

Parameters

fromInclusive Int32

The start index, inclusive.

toExclusive Int32

The end index, exclusive.

worker Func<Int32, T1, T2, T3, T4, T5, CancellationToken, Task>

The delegate that is invoked once per iteration.

arg1 T1

The first parameter of the delegate worker.

arg2 T2

The second parameter of the delegate worker.

arg3 T3

The third parameter of the delegate worker.

arg4 T4

The fourth parameter of the delegate worker.

arg5 T5

The fifth parameter of the delegate worker.

setup Action<AsyncWorkloadOptions>

The AsyncWorkloadOptions which may be configured.

Returns

Task

A Task that represents the asynchronous operation.

Type Parameters

T1

The type of the first parameter of the delegate worker.

T2

The type of the second parameter of the delegate worker.

T3

The type of the third parameter of the delegate worker.

T4

The type of the fourth parameter of the delegate worker.

T5

The type of the fifth parameter of the delegate worker.

ForAsync<T1, T2, T3, T4, T5>(Int64, Int64, Func<Int64, T1, T2, T3, T4, T5, CancellationToken, Task>, T1, T2, T3, T4, T5, Action<AsyncWorkloadOptions>)

Executes a parallel for loop.

public static Task ForAsync<T1, T2, T3, T4, T5>(long fromInclusive, long toExclusive, Func<long, T1, T2, T3, T4, T5, CancellationToken, Task> worker, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, Action<AsyncWorkloadOptions> setup = null)

Parameters

fromInclusive Int64

The start index, inclusive.

toExclusive Int64

The end index, exclusive.

worker Func<Int64, T1, T2, T3, T4, T5, CancellationToken, Task>

The delegate that is invoked once per iteration.

arg1 T1

The first parameter of the delegate worker.

arg2 T2

The second parameter of the delegate worker.

arg3 T3

The third parameter of the delegate worker.

arg4 T4

The fourth parameter of the delegate worker.

arg5 T5

The fifth parameter of the delegate worker.

setup Action<AsyncWorkloadOptions>

The AsyncWorkloadOptions which may be configured.

Returns

Task

A Task that represents the asynchronous operation.

Type Parameters

T1

The type of the first parameter of the delegate worker.

T2

The type of the second parameter of the delegate worker.

T3

The type of the third parameter of the delegate worker.

T4

The type of the fourth parameter of the delegate worker.

T5

The type of the fifth parameter of the delegate worker.

ForEach<TSource>(IEnumerable<TSource>, Action<TSource>, Action<AsyncTaskFactoryOptions>)

Executes a parallel foreach loop.

public static void ForEach<TSource>(IEnumerable<TSource> source, Action<TSource> worker, Action<AsyncTaskFactoryOptions> setup = null)

Parameters

source IEnumerable<TSource>

The sequence to iterate over parallel.

worker Action<TSource>

The delegate that is invoked once per iteration.

setup Action<AsyncTaskFactoryOptions>

The AsyncTaskFactoryOptions which may be configured.

Type Parameters

TSource

The type of the data in the source.

ForEach<TSource, T>(IEnumerable<TSource>, Action<TSource, T>, T, Action<AsyncTaskFactoryOptions>)

Executes a parallel foreach loop.

public static void ForEach<TSource, T>(IEnumerable<TSource> source, Action<TSource, T> worker, T arg, Action<AsyncTaskFactoryOptions> setup = null)

Parameters

source IEnumerable<TSource>

The sequence to iterate over parallel.

worker Action<TSource, T>

The delegate that is invoked once per iteration.

arg T

The parameter of the delegate worker.

setup Action<AsyncTaskFactoryOptions>

The AsyncTaskFactoryOptions which may be configured.

Type Parameters

TSource

The type of the data in the source.

T

The type of the parameter of the delegate worker.

ForEach<TSource, T1, T2>(IEnumerable<TSource>, Action<TSource, T1, T2>, T1, T2, Action<AsyncTaskFactoryOptions>)

Executes a parallel foreach loop.

public static void ForEach<TSource, T1, T2>(IEnumerable<TSource> source, Action<TSource, T1, T2> worker, T1 arg1, T2 arg2, Action<AsyncTaskFactoryOptions> setup = null)

Parameters

source IEnumerable<TSource>

The sequence to iterate over parallel.

worker Action<TSource, T1, T2>

The delegate that is invoked once per iteration.

arg1 T1

The first parameter of the delegate worker.

arg2 T2

The second parameter of the delegate worker.

setup Action<AsyncTaskFactoryOptions>

The AsyncTaskFactoryOptions which may be configured.

Type Parameters

TSource

The type of the data in the source.

T1

The type of the first parameter of the delegate worker.

T2

The type of the second parameter of the delegate worker.

ForEach<TSource, T1, T2, T3>(IEnumerable<TSource>, Action<TSource, T1, T2, T3>, T1, T2, T3, Action<AsyncTaskFactoryOptions>)

Executes a parallel foreach loop.

public static void ForEach<TSource, T1, T2, T3>(IEnumerable<TSource> source, Action<TSource, T1, T2, T3> worker, T1 arg1, T2 arg2, T3 arg3, Action<AsyncTaskFactoryOptions> setup = null)

Parameters

source IEnumerable<TSource>

The sequence to iterate over parallel.

worker Action<TSource, T1, T2, T3>

The delegate that is invoked once per iteration.

arg1 T1

The first parameter of the delegate worker.

arg2 T2

The second parameter of the delegate worker.

arg3 T3

The third parameter of the delegate worker.

setup Action<AsyncTaskFactoryOptions>

The AsyncTaskFactoryOptions which may be configured.

Type Parameters

TSource

The type of the data in the source.

T1

The type of the first parameter of the delegate worker.

T2

The type of the second parameter of the delegate worker.

T3

The type of the third parameter of the delegate worker.

ForEach<TSource, T1, T2, T3, T4>(IEnumerable<TSource>, Action<TSource, T1, T2, T3, T4>, T1, T2, T3, T4, Action<AsyncTaskFactoryOptions>)

Executes a parallel foreach loop.

public static void ForEach<TSource, T1, T2, T3, T4>(IEnumerable<TSource> source, Action<TSource, T1, T2, T3, T4> worker, T1 arg1, T2 arg2, T3 arg3, T4 arg4, Action<AsyncTaskFactoryOptions> setup = null)

Parameters

source IEnumerable<TSource>

The sequence to iterate over parallel.

worker Action<TSource, T1, T2, T3, T4>

The delegate that is invoked once per iteration.

arg1 T1

The first parameter of the delegate worker.

arg2 T2

The second parameter of the delegate worker.

arg3 T3

The third parameter of the delegate worker.

arg4 T4

The fourth parameter of the delegate worker.

setup Action<AsyncTaskFactoryOptions>

The AsyncTaskFactoryOptions which may be configured.

Type Parameters

TSource

The type of the data in the source.

T1

The type of the first parameter of the delegate worker.

T2

The type of the second parameter of the delegate worker.

T3

The type of the third parameter of the delegate worker.

T4

The type of the fourth parameter of the delegate worker.

ForEach<TSource, T1, T2, T3, T4, T5>(IEnumerable<TSource>, Action<TSource, T1, T2, T3, T4, T5>, T1, T2, T3, T4, T5, Action<AsyncTaskFactoryOptions>)

Executes a parallel foreach loop.

public static void ForEach<TSource, T1, T2, T3, T4, T5>(IEnumerable<TSource> source, Action<TSource, T1, T2, T3, T4, T5> worker, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, Action<AsyncTaskFactoryOptions> setup = null)

Parameters

source IEnumerable<TSource>

The sequence to iterate over parallel.

worker Action<TSource, T1, T2, T3, T4, T5>

The delegate that is invoked once per iteration.

arg1 T1

The first parameter of the delegate worker.

arg2 T2

The second parameter of the delegate worker.

arg3 T3

The third parameter of the delegate worker.

arg4 T4

The fourth parameter of the delegate worker.

arg5 T5

The fifth parameter of the delegate worker.

setup Action<AsyncTaskFactoryOptions>

The AsyncTaskFactoryOptions which may be configured.

Type Parameters

TSource

The type of the data in the source.

T1

The type of the first parameter of the delegate worker.

T2

The type of the second parameter of the delegate worker.

T3

The type of the third parameter of the delegate worker.

T4

The type of the fourth parameter of the delegate worker.

T5

The type of the fifth parameter of the delegate worker.

ForEachAsync<TSource>(IEnumerable<TSource>, Func<TSource, CancellationToken, Task>, Action<AsyncWorkloadOptions>)

Executes a parallel foreach loop.

public static Task ForEachAsync<TSource>(IEnumerable<TSource> source, Func<TSource, CancellationToken, Task> worker, Action<AsyncWorkloadOptions> setup = null)

Parameters

source IEnumerable<TSource>

The sequence to iterate over parallel.

worker Func<TSource, CancellationToken, Task>

The delegate that is invoked once per iteration.

setup Action<AsyncWorkloadOptions>

The AsyncWorkloadOptions which may be configured.

Returns

Task

A Task that represents the asynchronous operation.

Type Parameters

TSource

The type of the data in the source.

ForEachAsync<TSource, T>(IEnumerable<TSource>, Func<TSource, T, CancellationToken, Task>, T, Action<AsyncWorkloadOptions>)

Executes a parallel foreach loop.

public static Task ForEachAsync<TSource, T>(IEnumerable<TSource> source, Func<TSource, T, CancellationToken, Task> worker, T arg, Action<AsyncWorkloadOptions> setup = null)

Parameters

source IEnumerable<TSource>

The sequence to iterate over parallel.

worker Func<TSource, T, CancellationToken, Task>

The delegate that is invoked once per iteration.

arg T

The parameter of the delegate worker.

setup Action<AsyncWorkloadOptions>

The AsyncWorkloadOptions which may be configured.

Returns

Task

A Task that represents the asynchronous operation.

Type Parameters

TSource

The type of the data in the source.

T

The type of the parameter of the delegate worker.

ForEachAsync<TSource, T1, T2>(IEnumerable<TSource>, Func<TSource, T1, T2, CancellationToken, Task>, T1, T2, Action<AsyncWorkloadOptions>)

Executes a parallel foreach loop.

public static Task ForEachAsync<TSource, T1, T2>(IEnumerable<TSource> source, Func<TSource, T1, T2, CancellationToken, Task> worker, T1 arg1, T2 arg2, Action<AsyncWorkloadOptions> setup = null)

Parameters

source IEnumerable<TSource>

The sequence to iterate over parallel.

worker Func<TSource, T1, T2, CancellationToken, Task>

The delegate that is invoked once per iteration.

arg1 T1

The first parameter of the delegate worker.

arg2 T2

The second parameter of the delegate worker.

setup Action<AsyncWorkloadOptions>

The AsyncWorkloadOptions which may be configured.

Returns

Task

A Task that represents the asynchronous operation.

Type Parameters

TSource

The type of the data in the source.

T1

The type of the first parameter of the delegate worker.

T2

The type of the second parameter of the delegate worker.

ForEachAsync<TSource, T1, T2, T3>(IEnumerable<TSource>, Func<TSource, T1, T2, T3, CancellationToken, Task>, T1, T2, T3, Action<AsyncWorkloadOptions>)

Executes a parallel foreach loop.

public static Task ForEachAsync<TSource, T1, T2, T3>(IEnumerable<TSource> source, Func<TSource, T1, T2, T3, CancellationToken, Task> worker, T1 arg1, T2 arg2, T3 arg3, Action<AsyncWorkloadOptions> setup = null)

Parameters

source IEnumerable<TSource>

The sequence to iterate over parallel.

worker Func<TSource, T1, T2, T3, CancellationToken, Task>

The delegate that is invoked once per iteration.

arg1 T1

The first parameter of the delegate worker.

arg2 T2

The second parameter of the delegate worker.

arg3 T3

The third parameter of the delegate worker.

setup Action<AsyncWorkloadOptions>

The AsyncWorkloadOptions which may be configured.

Returns

Task

A Task that represents the asynchronous operation.

Type Parameters

TSource

The type of the data in the source.

T1

The type of the first parameter of the delegate worker.

T2

The type of the second parameter of the delegate worker.

T3

The type of the third parameter of the delegate worker.

ForEachAsync<TSource, T1, T2, T3, T4>(IEnumerable<TSource>, Func<TSource, T1, T2, T3, T4, CancellationToken, Task>, T1, T2, T3, T4, Action<AsyncWorkloadOptions>)

Executes a parallel foreach loop.

public static Task ForEachAsync<TSource, T1, T2, T3, T4>(IEnumerable<TSource> source, Func<TSource, T1, T2, T3, T4, CancellationToken, Task> worker, T1 arg1, T2 arg2, T3 arg3, T4 arg4, Action<AsyncWorkloadOptions> setup = null)

Parameters

source IEnumerable<TSource>

The sequence to iterate over parallel.

worker Func<TSource, T1, T2, T3, T4, CancellationToken, Task>

The delegate that is invoked once per iteration.

arg1 T1

The first parameter of the delegate worker.

arg2 T2

The second parameter of the delegate worker.

arg3 T3

The third parameter of the delegate worker.

arg4 T4

The fourth parameter of the delegate worker.

setup Action<AsyncWorkloadOptions>

The AsyncWorkloadOptions which may be configured.

Returns

Task

A Task that represents the asynchronous operation.

Type Parameters

TSource

The type of the data in the source.

T1

The type of the first parameter of the delegate worker.

T2

The type of the second parameter of the delegate worker.

T3

The type of the third parameter of the delegate worker.

T4

The type of the fourth parameter of the delegate worker.

ForEachAsync<TSource, T1, T2, T3, T4, T5>(IEnumerable<TSource>, Func<TSource, T1, T2, T3, T4, T5, CancellationToken, Task>, T1, T2, T3, T4, T5, Action<AsyncWorkloadOptions>)

Executes a parallel foreach loop.

public static Task ForEachAsync<TSource, T1, T2, T3, T4, T5>(IEnumerable<TSource> source, Func<TSource, T1, T2, T3, T4, T5, CancellationToken, Task> worker, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, Action<AsyncWorkloadOptions> setup = null)

Parameters

source IEnumerable<TSource>

The sequence to iterate over parallel.

worker Func<TSource, T1, T2, T3, T4, T5, CancellationToken, Task>

The delegate that is invoked once per iteration.

arg1 T1

The first parameter of the delegate worker.

arg2 T2

The second parameter of the delegate worker.

arg3 T3

The third parameter of the delegate worker.

arg4 T4

The fourth parameter of the delegate worker.

arg5 T5

The fifth parameter of the delegate worker.

setup Action<AsyncWorkloadOptions>

The AsyncWorkloadOptions which may be configured.

Returns

Task

A Task that represents the asynchronous operation.

Type Parameters

TSource

The type of the data in the source.

T1

The type of the first parameter of the delegate worker.

T2

The type of the second parameter of the delegate worker.

T3

The type of the third parameter of the delegate worker.

T4

The type of the fourth parameter of the delegate worker.

T5

The type of the fifth parameter of the delegate worker.

ForEachResult<TSource, TResult>(IEnumerable<TSource>, Func<TSource, TResult>, Action<AsyncTaskFactoryOptions>)

Executes a parallel foreach loop where the return value of the function delegate worker is stored in the same sequential order as source.

public static IReadOnlyCollection<TResult> ForEachResult<TSource, TResult>(IEnumerable<TSource> source, Func<TSource, TResult> worker, Action<AsyncTaskFactoryOptions> setup = null)

Parameters

source IEnumerable<TSource>

The sequence to iterate over parallel.

worker Func<TSource, TResult>

The delegate that is invoked once per iteration.

setup Action<AsyncTaskFactoryOptions>

The AsyncTaskFactoryOptions which may be configured.

Returns

IReadOnlyCollection<TResult>

A Task that represents the asynchronous operation. The task result contains an IReadOnlyCollection<T> where the return value of the function delegate worker is stored in the same sequential order as source.

Type Parameters

TSource

The type of the data in the source.

TResult

The type of the return value of the function delegate worker.

ForEachResult<TSource, T, TResult>(IEnumerable<TSource>, Func<TSource, T, TResult>, T, Action<AsyncTaskFactoryOptions>)

Executes a parallel foreach loop where the return value of the function delegate worker is stored in the same sequential order as source.

public static IReadOnlyCollection<TResult> ForEachResult<TSource, T, TResult>(IEnumerable<TSource> source, Func<TSource, T, TResult> worker, T arg, Action<AsyncTaskFactoryOptions> setup = null)

Parameters

source IEnumerable<TSource>

The sequence to iterate over parallel.

worker Func<TSource, T, TResult>

The delegate that is invoked once per iteration.

arg T

The parameter of the function delegate worker.

setup Action<AsyncTaskFactoryOptions>

The AsyncTaskFactoryOptions which may be configured.

Returns

IReadOnlyCollection<TResult>

An IReadOnlyCollection<T> where the return value of the function delegate worker is stored in the same sequential order as source.

Type Parameters

TSource

The type of the data in the source.

T

The type of the parameter of the function delegate worker.

TResult

The type of the return value of the function delegate worker.

ForEachResult<TSource, T1, T2, TResult>(IEnumerable<TSource>, Func<TSource, T1, T2, TResult>, T1, T2, Action<AsyncTaskFactoryOptions>)

Executes a parallel foreach loop where the return value of the function delegate worker is stored in the same sequential order as source.

public static IReadOnlyCollection<TResult> ForEachResult<TSource, T1, T2, TResult>(IEnumerable<TSource> source, Func<TSource, T1, T2, TResult> worker, T1 arg1, T2 arg2, Action<AsyncTaskFactoryOptions> setup = null)

Parameters

source IEnumerable<TSource>

The sequence to iterate over parallel.

worker Func<TSource, T1, T2, TResult>

The delegate that is invoked once per iteration.

arg1 T1

The first parameter of the function delegate worker.

arg2 T2

The second parameter of the function delegate worker.

setup Action<AsyncTaskFactoryOptions>

The AsyncTaskFactoryOptions which may be configured.

Returns

IReadOnlyCollection<TResult>

An IReadOnlyCollection<T> where the return value of the function delegate worker is stored in the same sequential order as source.

Type Parameters

TSource

The type of the data in the source.

T1

The type of the first parameter of the function delegate worker.

T2

The type of the second parameter of the function delegate worker.

TResult

The type of the return value of the function delegate worker.

ForEachResult<TSource, T1, T2, T3, TResult>(IEnumerable<TSource>, Func<TSource, T1, T2, T3, TResult>, T1, T2, T3, Action<AsyncTaskFactoryOptions>)

Executes a parallel foreach loop where the return value of the function delegate worker is stored in the same sequential order as source.

public static IReadOnlyCollection<TResult> ForEachResult<TSource, T1, T2, T3, TResult>(IEnumerable<TSource> source, Func<TSource, T1, T2, T3, TResult> worker, T1 arg1, T2 arg2, T3 arg3, Action<AsyncTaskFactoryOptions> setup = null)

Parameters

source IEnumerable<TSource>

The sequence to iterate over parallel.

worker Func<TSource, T1, T2, T3, TResult>

The delegate that is invoked once per iteration.

arg1 T1

The first parameter of the function delegate worker.

arg2 T2

The second parameter of the function delegate worker.

arg3 T3

The third parameter of the function delegate worker.

setup Action<AsyncTaskFactoryOptions>

The AsyncTaskFactoryOptions which may be configured.

Returns

IReadOnlyCollection<TResult>

An IReadOnlyCollection<T> where the return value of the function delegate worker is stored in the same sequential order as source.

Type Parameters

TSource

The type of the data in the source.

T1

The type of the first parameter of the function delegate worker.

T2

The type of the second parameter of the function delegate worker.

T3

The type of the third parameter of the function delegate worker.

TResult

The type of the return value of the function delegate worker.

ForEachResult<TSource, T1, T2, T3, T4, TResult>(IEnumerable<TSource>, Func<TSource, T1, T2, T3, T4, TResult>, T1, T2, T3, T4, Action<AsyncTaskFactoryOptions>)

Executes a parallel foreach loop where the return value of the function delegate worker is stored in the same sequential order as source.

public static IReadOnlyCollection<TResult> ForEachResult<TSource, T1, T2, T3, T4, TResult>(IEnumerable<TSource> source, Func<TSource, T1, T2, T3, T4, TResult> worker, T1 arg1, T2 arg2, T3 arg3, T4 arg4, Action<AsyncTaskFactoryOptions> setup = null)

Parameters

source IEnumerable<TSource>

The sequence to iterate over parallel.

worker Func<TSource, T1, T2, T3, T4, TResult>

The delegate that is invoked once per iteration.

arg1 T1

The first parameter of the function delegate worker.

arg2 T2

The second parameter of the function delegate worker.

arg3 T3

The third parameter of the function delegate worker.

arg4 T4

The fourth parameter of the function delegate worker.

setup Action<AsyncTaskFactoryOptions>

The AsyncTaskFactoryOptions which may be configured.

Returns

IReadOnlyCollection<TResult>

An IReadOnlyCollection<T> where the return value of the function delegate worker is stored in the same sequential order as source.

Type Parameters

TSource

The type of the data in the source.

T1

The type of the first parameter of the function delegate worker.

T2

The type of the second parameter of the function delegate worker.

T3

The type of the third parameter of the function delegate worker.

T4

The type of the fourth parameter of the function delegate worker.

TResult

The type of the return value of the function delegate worker.

ForEachResult<TSource, T1, T2, T3, T4, T5, TResult>(IEnumerable<TSource>, Func<TSource, T1, T2, T3, T4, T5, TResult>, T1, T2, T3, T4, T5, Action<AsyncTaskFactoryOptions>)

Executes a parallel foreach loop

public static IReadOnlyCollection<TResult> ForEachResult<TSource, T1, T2, T3, T4, T5, TResult>(IEnumerable<TSource> source, Func<TSource, T1, T2, T3, T4, T5, TResult> worker, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, Action<AsyncTaskFactoryOptions> setup = null)

Parameters

source IEnumerable<TSource>

The sequence to iterate over parallel.

worker Func<TSource, T1, T2, T3, T4, T5, TResult>

The delegate that is invoked once per iteration.

arg1 T1

The first parameter of the function delegate worker.

arg2 T2

The second parameter of the function delegate worker.

arg3 T3

The third parameter of the function delegate worker.

arg4 T4

The fourth parameter of the function delegate worker.

arg5 T5

The fifth parameter of the function delegate worker.

setup Action<AsyncTaskFactoryOptions>

The AsyncTaskFactoryOptions which may be configured.

Returns

IReadOnlyCollection<TResult>

An IReadOnlyCollection<T> where the return value of the function delegate worker is stored in the same sequential order as source.

Type Parameters

TSource

The type of the data in the source.

T1

The type of the first parameter of the function delegate worker.

T2

The type of the second parameter of the function delegate worker.

T3

The type of the third parameter of the function delegate worker.

T4

The type of the fourth parameter of the function delegate worker.

T5

The type of the fifth parameter of the function delegate worker.

TResult

The type of the return value of the function delegate worker.

ForEachResultAsync<TSource, TResult>(IEnumerable<TSource>, Func<TSource, CancellationToken, Task<TResult>>, Action<AsyncWorkloadOptions>)

Executes a parallel foreach loop where the return value of the function delegate worker is stored in the same sequential order as source.

public static Task<IReadOnlyCollection<TResult>> ForEachResultAsync<TSource, TResult>(IEnumerable<TSource> source, Func<TSource, CancellationToken, Task<TResult>> worker, Action<AsyncWorkloadOptions> setup = null)

Parameters

source IEnumerable<TSource>

The sequence to iterate over parallel.

worker Func<TSource, CancellationToken, Task<TResult>>

The delegate that is invoked once per iteration.

setup Action<AsyncWorkloadOptions>

The AsyncWorkloadOptions which may be configured.

Returns

Task<IReadOnlyCollection<TResult>>

A Task that represents the asynchronous operation. The task result contains an IReadOnlyCollection<T> where the return value of the function delegate worker is stored in the same sequential order as source.

Type Parameters

TSource

The type of the data in the source.

TResult

The type of the return value of the function delegate worker.

ForEachResultAsync<TSource, T, TResult>(IEnumerable<TSource>, Func<TSource, T, CancellationToken, Task<TResult>>, T, Action<AsyncWorkloadOptions>)

Executes a parallel foreach loop where the return value of the function delegate worker is stored in the same sequential order as source.

public static Task<IReadOnlyCollection<TResult>> ForEachResultAsync<TSource, T, TResult>(IEnumerable<TSource> source, Func<TSource, T, CancellationToken, Task<TResult>> worker, T arg, Action<AsyncWorkloadOptions> setup = null)

Parameters

source IEnumerable<TSource>

The sequence to iterate over parallel.

worker Func<TSource, T, CancellationToken, Task<TResult>>

The delegate that is invoked once per iteration.

arg T

The parameter of the function delegate worker.

setup Action<AsyncWorkloadOptions>

The AsyncWorkloadOptions which may be configured.

Returns

Task<IReadOnlyCollection<TResult>>

A Task that represents the asynchronous operation. The task result contains an IReadOnlyCollection<T> where the return value of the function delegate worker is stored in the same sequential order as source.

Type Parameters

TSource

The type of the data in the source.

T

The type of the parameter of the function delegate worker.

TResult

The type of the return value of the function delegate worker.

ForEachResultAsync<TSource, T1, T2, TResult>(IEnumerable<TSource>, Func<TSource, T1, T2, CancellationToken, Task<TResult>>, T1, T2, Action<AsyncWorkloadOptions>)

Executes a parallel foreach loop where the return value of the function delegate worker is stored in the same sequential order as source.

public static Task<IReadOnlyCollection<TResult>> ForEachResultAsync<TSource, T1, T2, TResult>(IEnumerable<TSource> source, Func<TSource, T1, T2, CancellationToken, Task<TResult>> worker, T1 arg1, T2 arg2, Action<AsyncWorkloadOptions> setup = null)

Parameters

source IEnumerable<TSource>

The sequence to iterate over parallel.

worker Func<TSource, T1, T2, CancellationToken, Task<TResult>>

The delegate that is invoked once per iteration.

arg1 T1

The first parameter of the function delegate worker.

arg2 T2

The second parameter of the function delegate worker.

setup Action<AsyncWorkloadOptions>

The AsyncWorkloadOptions which may be configured.

Returns

Task<IReadOnlyCollection<TResult>>

A Task that represents the asynchronous operation. The task result contains an IReadOnlyCollection<T> where the return value of the function delegate worker is stored in the same sequential order as source.

Type Parameters

TSource

The type of the data in the source.

T1

The type of the first parameter of the function delegate worker.

T2

The type of the second parameter of the function delegate worker.

TResult

The type of the return value of the function delegate worker.

ForEachResultAsync<TSource, T1, T2, T3, TResult>(IEnumerable<TSource>, Func<TSource, T1, T2, T3, CancellationToken, Task<TResult>>, T1, T2, T3, Action<AsyncWorkloadOptions>)

Executes a parallel foreach loop where the return value of the function delegate worker is stored in the same sequential order as source.

public static Task<IReadOnlyCollection<TResult>> ForEachResultAsync<TSource, T1, T2, T3, TResult>(IEnumerable<TSource> source, Func<TSource, T1, T2, T3, CancellationToken, Task<TResult>> worker, T1 arg1, T2 arg2, T3 arg3, Action<AsyncWorkloadOptions> setup = null)

Parameters

source IEnumerable<TSource>

The sequence to iterate over parallel.

worker Func<TSource, T1, T2, T3, CancellationToken, Task<TResult>>

The delegate that is invoked once per iteration.

arg1 T1

The first parameter of the function delegate worker.

arg2 T2

The second parameter of the function delegate worker.

arg3 T3

The third parameter of the function delegate worker.

setup Action<AsyncWorkloadOptions>

The AsyncWorkloadOptions which may be configured.

Returns

Task<IReadOnlyCollection<TResult>>

A Task that represents the asynchronous operation. The task result contains an IReadOnlyCollection<T> where the return value of the function delegate worker is stored in the same sequential order as source.

Type Parameters

TSource

The type of the data in the source.

T1

The type of the first parameter of the function delegate worker.

T2

The type of the second parameter of the function delegate worker.

T3

The type of the third parameter of the function delegate worker.

TResult

The type of the return value of the function delegate worker.

ForEachResultAsync<TSource, T1, T2, T3, T4, TResult>(IEnumerable<TSource>, Func<TSource, T1, T2, T3, T4, CancellationToken, Task<TResult>>, T1, T2, T3, T4, Action<AsyncWorkloadOptions>)

Executes a parallel foreach loop where the return value of the function delegate worker is stored in the same sequential order as source.

public static Task<IReadOnlyCollection<TResult>> ForEachResultAsync<TSource, T1, T2, T3, T4, TResult>(IEnumerable<TSource> source, Func<TSource, T1, T2, T3, T4, CancellationToken, Task<TResult>> worker, T1 arg1, T2 arg2, T3 arg3, T4 arg4, Action<AsyncWorkloadOptions> setup = null)

Parameters

source IEnumerable<TSource>

The sequence to iterate over parallel.

worker Func<TSource, T1, T2, T3, T4, CancellationToken, Task<TResult>>

The delegate that is invoked once per iteration.

arg1 T1

The first parameter of the function delegate worker.

arg2 T2

The second parameter of the function delegate worker.

arg3 T3

The third parameter of the function delegate worker.

arg4 T4

The fourth parameter of the function delegate worker.

setup Action<AsyncWorkloadOptions>

The AsyncWorkloadOptions which may be configured.

Returns

Task<IReadOnlyCollection<TResult>>

A Task that represents the asynchronous operation. The task result contains an IReadOnlyCollection<T> where the return value of the function delegate worker is stored in the same sequential order as source.

Type Parameters

TSource

The type of the data in the source.

T1

The type of the first parameter of the function delegate worker.

T2

The type of the second parameter of the function delegate worker.

T3

The type of the third parameter of the function delegate worker.

T4

The type of the fourth parameter of the function delegate worker.

TResult

The type of the return value of the function delegate worker.

ForEachResultAsync<TSource, T1, T2, T3, T4, T5, TResult>(IEnumerable<TSource>, Func<TSource, T1, T2, T3, T4, T5, CancellationToken, Task<TResult>>, T1, T2, T3, T4, T5, Action<AsyncWorkloadOptions>)

Executes a parallel foreach loop

public static Task<IReadOnlyCollection<TResult>> ForEachResultAsync<TSource, T1, T2, T3, T4, T5, TResult>(IEnumerable<TSource> source, Func<TSource, T1, T2, T3, T4, T5, CancellationToken, Task<TResult>> worker, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, Action<AsyncWorkloadOptions> setup = null)

Parameters

source IEnumerable<TSource>

The sequence to iterate over parallel.

worker Func<TSource, T1, T2, T3, T4, T5, CancellationToken, Task<TResult>>

The delegate that is invoked once per iteration.

arg1 T1

The first parameter of the function delegate worker.

arg2 T2

The second parameter of the function delegate worker.

arg3 T3

The third parameter of the function delegate worker.

arg4 T4

The fourth parameter of the function delegate worker.

arg5 T5

The fifth parameter of the function delegate worker.

setup Action<AsyncWorkloadOptions>

The AsyncWorkloadOptions which may be configured.

Returns

Task<IReadOnlyCollection<TResult>>

A Task that represents the asynchronous operation. The task result contains an IReadOnlyCollection<T> where the return value of the function delegate worker is stored in the same sequential order as source.

Type Parameters

TSource

The type of the data in the source.

T1

The type of the first parameter of the function delegate worker.

T2

The type of the second parameter of the function delegate worker.

T3

The type of the third parameter of the function delegate worker.

T4

The type of the fourth parameter of the function delegate worker.

T5

The type of the fifth parameter of the function delegate worker.

TResult

The type of the return value of the function delegate worker.

ForResult<TResult>(Int32, Int32, Func<Int32, TResult>, Action<AsyncTaskFactoryOptions>)

Executes a parallel for loop where the return value of the function delegate worker is stored in the same sequential order as the for loop.

public static IReadOnlyCollection<TResult> ForResult<TResult>(int fromInclusive, int toExclusive, Func<int, TResult> worker, Action<AsyncTaskFactoryOptions> setup = null)

Parameters

fromInclusive Int32

The start index, inclusive.

toExclusive Int32

The end index, exclusive.

worker Func<Int32, TResult>

The delegate that is invoked once per iteration.

setup Action<AsyncTaskFactoryOptions>

The AsyncTaskFactoryOptions which may be configured.

Returns

IReadOnlyCollection<TResult>

An IReadOnlyCollection<T> where the return value of the function delegate worker is stored in the same sequential order as the for loop.

Type Parameters

TResult

The type of the return value of the function delegate worker.

ForResult<TResult>(Int64, Int64, Func<Int64, TResult>, Action<AsyncTaskFactoryOptions>)

Executes a parallel for loop where the return value of the function delegate worker is stored in the same sequential order as the for loop.

public static IReadOnlyCollection<TResult> ForResult<TResult>(long fromInclusive, long toExclusive, Func<long, TResult> worker, Action<AsyncTaskFactoryOptions> setup = null)

Parameters

fromInclusive Int64

The start index, inclusive.

toExclusive Int64

The end index, exclusive.

worker Func<Int64, TResult>

The delegate that is invoked once per iteration.

setup Action<AsyncTaskFactoryOptions>

The AsyncTaskFactoryOptions which may be configured.

Returns

IReadOnlyCollection<TResult>

An IReadOnlyCollection<T> where the return value of the function delegate worker is stored in the same sequential order as the for loop.

Type Parameters

TResult

The type of the return value of the function delegate worker.

ForResult<T, TResult>(Int32, Int32, Func<Int32, T, TResult>, T, Action<AsyncTaskFactoryOptions>)

Executes a parallel for loop where the return value of the function delegate worker is stored in the same sequential order as the for loop.

public static IReadOnlyCollection<TResult> ForResult<T, TResult>(int fromInclusive, int toExclusive, Func<int, T, TResult> worker, T arg, Action<AsyncTaskFactoryOptions> setup = null)

Parameters

fromInclusive Int32

The start index, inclusive.

toExclusive Int32

The end index, exclusive.

worker Func<Int32, T, TResult>

The delegate that is invoked once per iteration.

arg T

The parameter of the function delegate worker.

setup Action<AsyncTaskFactoryOptions>

The AsyncTaskFactoryOptions which may be configured.

Returns

IReadOnlyCollection<TResult>

An IReadOnlyCollection<T> where the return value of the function delegate worker is stored in the same sequential order as the for loop.

Type Parameters

T

The type of the parameter of the function delegate worker.

TResult

The type of the return value of the function delegate worker.

ForResult<T, TResult>(Int64, Int64, Func<Int64, T, TResult>, T, Action<AsyncTaskFactoryOptions>)

Executes a parallel for loop where the return value of the function delegate worker is stored in the same sequential order as the for loop.

public static IReadOnlyCollection<TResult> ForResult<T, TResult>(long fromInclusive, long toExclusive, Func<long, T, TResult> worker, T arg, Action<AsyncTaskFactoryOptions> setup = null)

Parameters

fromInclusive Int64

The start index, inclusive.

toExclusive Int64

The end index, exclusive.

worker Func<Int64, T, TResult>

The delegate that is invoked once per iteration.

arg T

The parameter of the function delegate worker.

setup Action<AsyncTaskFactoryOptions>

The AsyncTaskFactoryOptions which may be configured.

Returns

IReadOnlyCollection<TResult>

An IReadOnlyCollection<T> where the return value of the function delegate worker is stored in the same sequential order as the for loop.

Type Parameters

T

The type of the parameter of the function delegate worker.

TResult

The type of the return value of the function delegate worker.

ForResult<T1, T2, TResult>(Int32, Int32, Func<Int32, T1, T2, TResult>, T1, T2, Action<AsyncTaskFactoryOptions>)

Executes a parallel for loop where the return value of the function delegate worker is stored in the same sequential order as the for loop.

public static IReadOnlyCollection<TResult> ForResult<T1, T2, TResult>(int fromInclusive, int toExclusive, Func<int, T1, T2, TResult> worker, T1 arg1, T2 arg2, Action<AsyncTaskFactoryOptions> setup = null)

Parameters

fromInclusive Int32

The start index, inclusive.

toExclusive Int32

The end index, exclusive.

worker Func<Int32, T1, T2, TResult>

The delegate that is invoked once per iteration.

arg1 T1

The first parameter of the function delegate worker.

arg2 T2

The second parameter of the function delegate worker.

setup Action<AsyncTaskFactoryOptions>

The AsyncTaskFactoryOptions which may be configured.

Returns

IReadOnlyCollection<TResult>

An IReadOnlyCollection<T> where the return value of the function delegate worker is stored in the same sequential order as the for loop.

Type Parameters

T1

The type of the first parameter of the function delegate worker.

T2

The type of the second parameter of the function delegate worker.

TResult

The type of the return value of the function delegate worker.

ForResult<T1, T2, TResult>(Int64, Int64, Func<Int64, T1, T2, TResult>, T1, T2, Action<AsyncTaskFactoryOptions>)

Executes a parallel for loop where the return value of the function delegate worker is stored in the same sequential order as the for loop.

public static IReadOnlyCollection<TResult> ForResult<T1, T2, TResult>(long fromInclusive, long toExclusive, Func<long, T1, T2, TResult> worker, T1 arg1, T2 arg2, Action<AsyncTaskFactoryOptions> setup = null)

Parameters

fromInclusive Int64

The start index, inclusive.

toExclusive Int64

The end index, exclusive.

worker Func<Int64, T1, T2, TResult>

The delegate that is invoked once per iteration.

arg1 T1

The first parameter of the function delegate worker.

arg2 T2

The second parameter of the function delegate worker.

setup Action<AsyncTaskFactoryOptions>

The AsyncTaskFactoryOptions which may be configured.

Returns

IReadOnlyCollection<TResult>

An IReadOnlyCollection<T> where the return value of the function delegate worker is stored in the same sequential order as the for loop.

Type Parameters

T1

The type of the first parameter of the function delegate worker.

T2

The type of the second parameter of the function delegate worker.

TResult

The type of the return value of the function delegate worker.

ForResult<T1, T2, T3, TResult>(Int32, Int32, Func<Int32, T1, T2, T3, TResult>, T1, T2, T3, Action<AsyncTaskFactoryOptions>)

Executes a parallel for loop where the return value of the function delegate worker is stored in the same sequential order as the for loop.

public static IReadOnlyCollection<TResult> ForResult<T1, T2, T3, TResult>(int fromInclusive, int toExclusive, Func<int, T1, T2, T3, TResult> worker, T1 arg1, T2 arg2, T3 arg3, Action<AsyncTaskFactoryOptions> setup = null)

Parameters

fromInclusive Int32

The start index, inclusive.

toExclusive Int32

The end index, exclusive.

worker Func<Int32, T1, T2, T3, TResult>

The delegate that is invoked once per iteration.

arg1 T1

The first parameter of the function delegate worker.

arg2 T2

The second parameter of the function delegate worker.

arg3 T3

The third parameter of the function delegate worker.

setup Action<AsyncTaskFactoryOptions>

The AsyncTaskFactoryOptions which may be configured.

Returns

IReadOnlyCollection<TResult>

An IReadOnlyCollection<T> where the return value of the function delegate worker is stored in the same sequential order as the for loop.

Type Parameters

T1

The type of the first parameter of the function delegate worker.

T2

The type of the second parameter of the function delegate worker.

T3

The type of the third parameter of the function delegate worker.

TResult

The type of the return value of the function delegate worker.

ForResult<T1, T2, T3, TResult>(Int64, Int64, Func<Int64, T1, T2, T3, TResult>, T1, T2, T3, Action<AsyncTaskFactoryOptions>)

Executes a parallel for loop where the return value of the function delegate worker is stored in the same sequential order as the for loop.

public static IReadOnlyCollection<TResult> ForResult<T1, T2, T3, TResult>(long fromInclusive, long toExclusive, Func<long, T1, T2, T3, TResult> worker, T1 arg1, T2 arg2, T3 arg3, Action<AsyncTaskFactoryOptions> setup = null)

Parameters

fromInclusive Int64

The start index, inclusive.

toExclusive Int64

The end index, exclusive.

worker Func<Int64, T1, T2, T3, TResult>

The delegate that is invoked once per iteration.

arg1 T1

The first parameter of the function delegate worker.

arg2 T2

The second parameter of the function delegate worker.

arg3 T3

The third parameter of the function delegate worker.

setup Action<AsyncTaskFactoryOptions>

The AsyncTaskFactoryOptions which may be configured.

Returns

IReadOnlyCollection<TResult>

An IReadOnlyCollection<T> where the return value of the function delegate worker is stored in the same sequential order as the for loop.

Type Parameters

T1

The type of the first parameter of the function delegate worker.

T2

The type of the second parameter of the function delegate worker.

T3

The type of the third parameter of the function delegate worker.

TResult

The type of the return value of the function delegate worker.

ForResult<T1, T2, T3, T4, TResult>(Int32, Int32, Func<Int32, T1, T2, T3, T4, TResult>, T1, T2, T3, T4, Action<AsyncTaskFactoryOptions>)

Executes a parallel for loop where the return value of the function delegate worker is stored in the same sequential order as the for loop.

public static IReadOnlyCollection<TResult> ForResult<T1, T2, T3, T4, TResult>(int fromInclusive, int toExclusive, Func<int, T1, T2, T3, T4, TResult> worker, T1 arg1, T2 arg2, T3 arg3, T4 arg4, Action<AsyncTaskFactoryOptions> setup = null)

Parameters

fromInclusive Int32

The start index, inclusive.

toExclusive Int32

The end index, exclusive.

worker Func<Int32, T1, T2, T3, T4, TResult>

The delegate that is invoked once per iteration.

arg1 T1

The first parameter of the function delegate worker.

arg2 T2

The second parameter of the function delegate worker.

arg3 T3

The third parameter of the function delegate worker.

arg4 T4

The fourth parameter of the function delegate worker.

setup Action<AsyncTaskFactoryOptions>

The AsyncTaskFactoryOptions which may be configured.

Returns

IReadOnlyCollection<TResult>

An IReadOnlyCollection<T> where the return value of the function delegate worker is stored in the same sequential order as the for loop.

Type Parameters

T1

The type of the first parameter of the function delegate worker.

T2

The type of the second parameter of the function delegate worker.

T3

The type of the third parameter of the function delegate worker.

T4

The type of the fourth parameter of the function delegate worker.

TResult

The type of the return value of the function delegate worker.

ForResult<T1, T2, T3, T4, TResult>(Int64, Int64, Func<Int64, T1, T2, T3, T4, TResult>, T1, T2, T3, T4, Action<AsyncTaskFactoryOptions>)

Executes a parallel for loop where the return value of the function delegate worker is stored in the same sequential order as the for loop.

public static IReadOnlyCollection<TResult> ForResult<T1, T2, T3, T4, TResult>(long fromInclusive, long toExclusive, Func<long, T1, T2, T3, T4, TResult> worker, T1 arg1, T2 arg2, T3 arg3, T4 arg4, Action<AsyncTaskFactoryOptions> setup = null)

Parameters

fromInclusive Int64

The start index, inclusive.

toExclusive Int64

The end index, exclusive.

worker Func<Int64, T1, T2, T3, T4, TResult>

The delegate that is invoked once per iteration.

arg1 T1

The first parameter of the function delegate worker.

arg2 T2

The second parameter of the function delegate worker.

arg3 T3

The third parameter of the function delegate worker.

arg4 T4

The fourth parameter of the function delegate worker.

setup Action<AsyncTaskFactoryOptions>

The AsyncTaskFactoryOptions which may be configured.

Returns

IReadOnlyCollection<TResult>

An IReadOnlyCollection<T> where the return value of the function delegate worker is stored in the same sequential order as the for loop.

Type Parameters

T1

The type of the first parameter of the function delegate worker.

T2

The type of the second parameter of the function delegate worker.

T3

The type of the third parameter of the function delegate worker.

T4

The type of the fourth parameter of the function delegate worker.

TResult

The type of the return value of the function delegate worker.

ForResult<T1, T2, T3, T4, T5, TResult>(Int32, Int32, Func<Int32, T1, T2, T3, T4, T5, TResult>, T1, T2, T3, T4, T5, Action<AsyncTaskFactoryOptions>)

Executes a parallel for loop where the return value of the function delegate worker is stored in the same sequential order as the for loop.

public static IReadOnlyCollection<TResult> ForResult<T1, T2, T3, T4, T5, TResult>(int fromInclusive, int toExclusive, Func<int, T1, T2, T3, T4, T5, TResult> worker, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, Action<AsyncTaskFactoryOptions> setup = null)

Parameters

fromInclusive Int32

The start index, inclusive.

toExclusive Int32

The end index, exclusive.

worker Func<Int32, T1, T2, T3, T4, T5, TResult>

The delegate that is invoked once per iteration.

arg1 T1

The first parameter of the function delegate worker.

arg2 T2

The second parameter of the function delegate worker.

arg3 T3

The third parameter of the function delegate worker.

arg4 T4

The fourth parameter of the function delegate worker.

arg5 T5

The fifth parameter of the function delegate worker.

setup Action<AsyncTaskFactoryOptions>

The AsyncTaskFactoryOptions which may be configured.

Returns

IReadOnlyCollection<TResult>

An IReadOnlyCollection<T> where the return value of the function delegate worker is stored in the same sequential order as the for loop.

Type Parameters

T1

The type of the first parameter of the function delegate worker.

T2

The type of the second parameter of the function delegate worker.

T3

The type of the third parameter of the function delegate worker.

T4

The type of the fourth parameter of the function delegate worker.

T5

The type of the fifth parameter of the function delegate worker.

TResult

The type of the return value of the function delegate worker.

ForResult<T1, T2, T3, T4, T5, TResult>(Int64, Int64, Func<Int64, T1, T2, T3, T4, T5, TResult>, T1, T2, T3, T4, T5, Action<AsyncTaskFactoryOptions>)

Executes a parallel for loop where the return value of the function delegate worker is stored in the same sequential order as the for loop.

public static IReadOnlyCollection<TResult> ForResult<T1, T2, T3, T4, T5, TResult>(long fromInclusive, long toExclusive, Func<long, T1, T2, T3, T4, T5, TResult> worker, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, Action<AsyncTaskFactoryOptions> setup = null)

Parameters

fromInclusive Int64

The start index, inclusive.

toExclusive Int64

The end index, exclusive.

worker Func<Int64, T1, T2, T3, T4, T5, TResult>

The delegate that is invoked once per iteration.

arg1 T1

The first parameter of the function delegate worker.

arg2 T2

The second parameter of the function delegate worker.

arg3 T3

The third parameter of the function delegate worker.

arg4 T4

The fourth parameter of the function delegate worker.

arg5 T5

The fifth parameter of the function delegate worker.

setup Action<AsyncTaskFactoryOptions>

The AsyncTaskFactoryOptions which may be configured.

Returns

IReadOnlyCollection<TResult>

An IReadOnlyCollection<T> where the return value of the function delegate worker is stored in the same sequential order as the for loop.

Type Parameters

T1

The type of the first parameter of the function delegate worker.

T2

The type of the second parameter of the function delegate worker.

T3

The type of the third parameter of the function delegate worker.

T4

The type of the fourth parameter of the function delegate worker.

T5

The type of the fifth parameter of the function delegate worker.

TResult

The type of the return value of the function delegate worker.

ForResultAsync<TResult>(Int32, Int32, Func<Int32, CancellationToken, Task<TResult>>, Action<AsyncWorkloadOptions>)

Executes a parallel for loop where the return value of the function delegate worker is stored in the same sequential order as the for loop.

public static Task<IReadOnlyCollection<TResult>> ForResultAsync<TResult>(int fromInclusive, int toExclusive, Func<int, CancellationToken, Task<TResult>> worker, Action<AsyncWorkloadOptions> setup = null)

Parameters

fromInclusive Int32

The start index, inclusive.

toExclusive Int32

The end index, exclusive.

worker Func<Int32, CancellationToken, Task<TResult>>

The delegate that is invoked once per iteration.

setup Action<AsyncWorkloadOptions>

The AsyncWorkloadOptions which may be configured.

Returns

Task<IReadOnlyCollection<TResult>>

A Task that represents the asynchronous operation. The task result contains an IReadOnlyCollection<T> where the return value of the function delegate worker is stored in the same sequential order as the for loop.

Type Parameters

TResult

The type of the return value of the function delegate worker.

ForResultAsync<TResult>(Int64, Int64, Func<Int64, CancellationToken, Task<TResult>>, Action<AsyncWorkloadOptions>)

Executes a parallel for loop where the return value of the function delegate worker is stored in the same sequential order as the for loop.

public static Task<IReadOnlyCollection<TResult>> ForResultAsync<TResult>(long fromInclusive, long toExclusive, Func<long, CancellationToken, Task<TResult>> worker, Action<AsyncWorkloadOptions> setup = null)

Parameters

fromInclusive Int64

The start index, inclusive.

toExclusive Int64

The end index, exclusive.

worker Func<Int64, CancellationToken, Task<TResult>>

The delegate that is invoked once per iteration.

setup Action<AsyncWorkloadOptions>

The AsyncWorkloadOptions which may be configured.

Returns

Task<IReadOnlyCollection<TResult>>

A Task that represents the asynchronous operation. The task result contains an IReadOnlyCollection<T> where the return value of the function delegate worker is stored in the same sequential order as the for loop.

Type Parameters

TResult

The type of the return value of the function delegate worker.

ForResultAsync<T, TResult>(Int32, Int32, Func<Int32, T, CancellationToken, Task<TResult>>, T, Action<AsyncWorkloadOptions>)

Executes a parallel for loop where the return value of the function delegate worker is stored in the same sequential order as the for loop.

public static Task<IReadOnlyCollection<TResult>> ForResultAsync<T, TResult>(int fromInclusive, int toExclusive, Func<int, T, CancellationToken, Task<TResult>> worker, T arg, Action<AsyncWorkloadOptions> setup = null)

Parameters

fromInclusive Int32

The start index, inclusive.

toExclusive Int32

The end index, exclusive.

worker Func<Int32, T, CancellationToken, Task<TResult>>

The delegate that is invoked once per iteration.

arg T

The parameter of the function delegate worker.

setup Action<AsyncWorkloadOptions>

The AsyncWorkloadOptions which may be configured.

Returns

Task<IReadOnlyCollection<TResult>>

A Task that represents the asynchronous operation. The task result contains an IReadOnlyCollection<T> where the return value of the function delegate worker is stored in the same sequential order as the for loop.

Type Parameters

T

The type of the parameter of the function delegate worker.

TResult

The type of the return value of the function delegate worker.

ForResultAsync<T, TResult>(Int64, Int64, Func<Int64, T, CancellationToken, Task<TResult>>, T, Action<AsyncWorkloadOptions>)

Executes a parallel for loop where the return value of the function delegate worker is stored in the same sequential order as the for loop.

public static Task<IReadOnlyCollection<TResult>> ForResultAsync<T, TResult>(long fromInclusive, long toExclusive, Func<long, T, CancellationToken, Task<TResult>> worker, T arg, Action<AsyncWorkloadOptions> setup = null)

Parameters

fromInclusive Int64

The start index, inclusive.

toExclusive Int64

The end index, exclusive.

worker Func<Int64, T, CancellationToken, Task<TResult>>

The delegate that is invoked once per iteration.

arg T

The parameter of the function delegate worker.

setup Action<AsyncWorkloadOptions>

The AsyncWorkloadOptions which may be configured.

Returns

Task<IReadOnlyCollection<TResult>>

A Task that represents the asynchronous operation. The task result contains an IReadOnlyCollection<T> where the return value of the function delegate worker is stored in the same sequential order as the for loop.

Type Parameters

T

The type of the parameter of the function delegate worker.

TResult

The type of the return value of the function delegate worker.

ForResultAsync<T1, T2, TResult>(Int32, Int32, Func<Int32, T1, T2, CancellationToken, Task<TResult>>, T1, T2, Action<AsyncWorkloadOptions>)

Executes a parallel for loop where the return value of the function delegate worker is stored in the same sequential order as the for loop.

public static Task<IReadOnlyCollection<TResult>> ForResultAsync<T1, T2, TResult>(int fromInclusive, int toExclusive, Func<int, T1, T2, CancellationToken, Task<TResult>> worker, T1 arg1, T2 arg2, Action<AsyncWorkloadOptions> setup = null)

Parameters

fromInclusive Int32

The start index, inclusive.

toExclusive Int32

The end index, exclusive.

worker Func<Int32, T1, T2, CancellationToken, Task<TResult>>

The delegate that is invoked once per iteration.

arg1 T1

The first parameter of the function delegate worker.

arg2 T2

The second parameter of the function delegate worker.

setup Action<AsyncWorkloadOptions>

The AsyncWorkloadOptions which may be configured.

Returns

Task<IReadOnlyCollection<TResult>>

A Task that represents the asynchronous operation. The task result contains an IReadOnlyCollection<T> where the return value of the function delegate worker is stored in the same sequential order as the for loop.

Type Parameters

T1

The type of the first parameter of the function delegate worker.

T2

The type of the second parameter of the function delegate worker.

TResult

The type of the return value of the function delegate worker.

ForResultAsync<T1, T2, TResult>(Int64, Int64, Func<Int64, T1, T2, CancellationToken, Task<TResult>>, T1, T2, Action<AsyncWorkloadOptions>)

Executes a parallel for loop where the return value of the function delegate worker is stored in the same sequential order as the for loop.

public static Task<IReadOnlyCollection<TResult>> ForResultAsync<T1, T2, TResult>(long fromInclusive, long toExclusive, Func<long, T1, T2, CancellationToken, Task<TResult>> worker, T1 arg1, T2 arg2, Action<AsyncWorkloadOptions> setup = null)

Parameters

fromInclusive Int64

The start index, inclusive.

toExclusive Int64

The end index, exclusive.

worker Func<Int64, T1, T2, CancellationToken, Task<TResult>>

The delegate that is invoked once per iteration.

arg1 T1

The first parameter of the function delegate worker.

arg2 T2

The second parameter of the function delegate worker.

setup Action<AsyncWorkloadOptions>

The AsyncWorkloadOptions which may be configured.

Returns

Task<IReadOnlyCollection<TResult>>

A Task that represents the asynchronous operation. The task result contains an IReadOnlyCollection<T> where the return value of the function delegate worker is stored in the same sequential order as the for loop.

Type Parameters

T1

The type of the first parameter of the function delegate worker.

T2

The type of the second parameter of the function delegate worker.

TResult

The type of the return value of the function delegate worker.

ForResultAsync<T1, T2, T3, TResult>(Int32, Int32, Func<Int32, T1, T2, T3, CancellationToken, Task<TResult>>, T1, T2, T3, Action<AsyncWorkloadOptions>)

Executes a parallel for loop where the return value of the function delegate worker is stored in the same sequential order as the for loop.

public static Task<IReadOnlyCollection<TResult>> ForResultAsync<T1, T2, T3, TResult>(int fromInclusive, int toExclusive, Func<int, T1, T2, T3, CancellationToken, Task<TResult>> worker, T1 arg1, T2 arg2, T3 arg3, Action<AsyncWorkloadOptions> setup = null)

Parameters

fromInclusive Int32

The start index, inclusive.

toExclusive Int32

The end index, exclusive.

worker Func<Int32, T1, T2, T3, CancellationToken, Task<TResult>>

The delegate that is invoked once per iteration.

arg1 T1

The first parameter of the function delegate worker.

arg2 T2

The second parameter of the function delegate worker.

arg3 T3

The third parameter of the function delegate worker.

setup Action<AsyncWorkloadOptions>

The AsyncWorkloadOptions which may be configured.

Returns

Task<IReadOnlyCollection<TResult>>

A Task that represents the asynchronous operation. The task result contains an IReadOnlyCollection<T> where the return value of the function delegate worker is stored in the same sequential order as the for loop.

Type Parameters

T1

The type of the first parameter of the function delegate worker.

T2

The type of the second parameter of the function delegate worker.

T3

The type of the third parameter of the function delegate worker.

TResult

The type of the return value of the function delegate worker.

ForResultAsync<T1, T2, T3, TResult>(Int64, Int64, Func<Int64, T1, T2, T3, CancellationToken, Task<TResult>>, T1, T2, T3, Action<AsyncWorkloadOptions>)

Executes a parallel for loop where the return value of the function delegate worker is stored in the same sequential order as the for loop.

public static Task<IReadOnlyCollection<TResult>> ForResultAsync<T1, T2, T3, TResult>(long fromInclusive, long toExclusive, Func<long, T1, T2, T3, CancellationToken, Task<TResult>> worker, T1 arg1, T2 arg2, T3 arg3, Action<AsyncWorkloadOptions> setup = null)

Parameters

fromInclusive Int64

The start index, inclusive.

toExclusive Int64

The end index, exclusive.

worker Func<Int64, T1, T2, T3, CancellationToken, Task<TResult>>

The delegate that is invoked once per iteration.

arg1 T1

The first parameter of the function delegate worker.

arg2 T2

The second parameter of the function delegate worker.

arg3 T3

The third parameter of the function delegate worker.

setup Action<AsyncWorkloadOptions>

The AsyncWorkloadOptions which may be configured.

Returns

Task<IReadOnlyCollection<TResult>>

A Task that represents the asynchronous operation. The task result contains an IReadOnlyCollection<T> where the return value of the function delegate worker is stored in the same sequential order as the for loop.

Type Parameters

T1

The type of the first parameter of the function delegate worker.

T2

The type of the second parameter of the function delegate worker.

T3

The type of the third parameter of the function delegate worker.

TResult

The type of the return value of the function delegate worker.

ForResultAsync<T1, T2, T3, T4, TResult>(Int32, Int32, Func<Int32, T1, T2, T3, T4, CancellationToken, Task<TResult>>, T1, T2, T3, T4, Action<AsyncWorkloadOptions>)

Executes a parallel for loop where the return value of the function delegate worker is stored in the same sequential order as the for loop.

public static Task<IReadOnlyCollection<TResult>> ForResultAsync<T1, T2, T3, T4, TResult>(int fromInclusive, int toExclusive, Func<int, T1, T2, T3, T4, CancellationToken, Task<TResult>> worker, T1 arg1, T2 arg2, T3 arg3, T4 arg4, Action<AsyncWorkloadOptions> setup = null)

Parameters

fromInclusive Int32

The start index, inclusive.

toExclusive Int32

The end index, exclusive.

worker Func<Int32, T1, T2, T3, T4, CancellationToken, Task<TResult>>

The delegate that is invoked once per iteration.

arg1 T1

The first parameter of the function delegate worker.

arg2 T2

The second parameter of the function delegate worker.

arg3 T3

The third parameter of the function delegate worker.

arg4 T4

The fourth parameter of the function delegate worker.

setup Action<AsyncWorkloadOptions>

The AsyncWorkloadOptions which may be configured.

Returns

Task<IReadOnlyCollection<TResult>>

A Task that represents the asynchronous operation. The task result contains an IReadOnlyCollection<T> where the return value of the function delegate worker is stored in the same sequential order as the for loop.

Type Parameters

T1

The type of the first parameter of the function delegate worker.

T2

The type of the second parameter of the function delegate worker.

T3

The type of the third parameter of the function delegate worker.

T4

The type of the fourth parameter of the function delegate worker.

TResult

The type of the return value of the function delegate worker.

ForResultAsync<T1, T2, T3, T4, TResult>(Int64, Int64, Func<Int64, T1, T2, T3, T4, CancellationToken, Task<TResult>>, T1, T2, T3, T4, Action<AsyncWorkloadOptions>)

Executes a parallel for loop where the return value of the function delegate worker is stored in the same sequential order as the for loop.

public static Task<IReadOnlyCollection<TResult>> ForResultAsync<T1, T2, T3, T4, TResult>(long fromInclusive, long toExclusive, Func<long, T1, T2, T3, T4, CancellationToken, Task<TResult>> worker, T1 arg1, T2 arg2, T3 arg3, T4 arg4, Action<AsyncWorkloadOptions> setup = null)

Parameters

fromInclusive Int64

The start index, inclusive.

toExclusive Int64

The end index, exclusive.

worker Func<Int64, T1, T2, T3, T4, CancellationToken, Task<TResult>>

The delegate that is invoked once per iteration.

arg1 T1

The first parameter of the function delegate worker.

arg2 T2

The second parameter of the function delegate worker.

arg3 T3

The third parameter of the function delegate worker.

arg4 T4

The fourth parameter of the function delegate worker.

setup Action<AsyncWorkloadOptions>

The AsyncWorkloadOptions which may be configured.

Returns

Task<IReadOnlyCollection<TResult>>

A Task that represents the asynchronous operation. The task result contains an IReadOnlyCollection<T> where the return value of the function delegate worker is stored in the same sequential order as the for loop.

Type Parameters

T1

The type of the first parameter of the function delegate worker.

T2

The type of the second parameter of the function delegate worker.

T3

The type of the third parameter of the function delegate worker.

T4

The type of the fourth parameter of the function delegate worker.

TResult

The type of the return value of the function delegate worker.

ForResultAsync<T1, T2, T3, T4, T5, TResult>(Int32, Int32, Func<Int32, T1, T2, T3, T4, T5, CancellationToken, Task<TResult>>, T1, T2, T3, T4, T5, Action<AsyncWorkloadOptions>)

Executes a parallel for loop where the return value of the function delegate worker is stored in the same sequential order as the for loop.

public static Task<IReadOnlyCollection<TResult>> ForResultAsync<T1, T2, T3, T4, T5, TResult>(int fromInclusive, int toExclusive, Func<int, T1, T2, T3, T4, T5, CancellationToken, Task<TResult>> worker, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, Action<AsyncWorkloadOptions> setup = null)

Parameters

fromInclusive Int32

The start index, inclusive.

toExclusive Int32

The end index, exclusive.

worker Func<Int32, T1, T2, T3, T4, T5, CancellationToken, Task<TResult>>

The delegate that is invoked once per iteration.

arg1 T1

The first parameter of the function delegate worker.

arg2 T2

The second parameter of the function delegate worker.

arg3 T3

The third parameter of the function delegate worker.

arg4 T4

The fourth parameter of the function delegate worker.

arg5 T5

The fifth parameter of the function delegate worker.

setup Action<AsyncWorkloadOptions>

The AsyncWorkloadOptions which may be configured.

Returns

Task<IReadOnlyCollection<TResult>>

A Task that represents the asynchronous operation. The task result contains an IReadOnlyCollection<T> where the return value of the function delegate worker is stored in the same sequential order as the for loop.

Type Parameters

T1

The type of the first parameter of the function delegate worker.

T2

The type of the second parameter of the function delegate worker.

T3

The type of the third parameter of the function delegate worker.

T4

The type of the fourth parameter of the function delegate worker.

T5

The type of the fifth parameter of the function delegate worker.

TResult

The type of the return value of the function delegate worker.

ForResultAsync<T1, T2, T3, T4, T5, TResult>(Int64, Int64, Func<Int64, T1, T2, T3, T4, T5, CancellationToken, Task<TResult>>, T1, T2, T3, T4, T5, Action<AsyncWorkloadOptions>)

Executes a parallel for loop where the return value of the function delegate worker is stored in the same sequential order as the for loop.

public static Task<IReadOnlyCollection<TResult>> ForResultAsync<T1, T2, T3, T4, T5, TResult>(long fromInclusive, long toExclusive, Func<long, T1, T2, T3, T4, T5, CancellationToken, Task<TResult>> worker, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, Action<AsyncWorkloadOptions> setup = null)

Parameters

fromInclusive Int64

The start index, inclusive.

toExclusive Int64

The end index, exclusive.

worker Func<Int64, T1, T2, T3, T4, T5, CancellationToken, Task<TResult>>

The delegate that is invoked once per iteration.

arg1 T1

The first parameter of the function delegate worker.

arg2 T2

The second parameter of the function delegate worker.

arg3 T3

The third parameter of the function delegate worker.

arg4 T4

The fourth parameter of the function delegate worker.

arg5 T5

The fifth parameter of the function delegate worker.

setup Action<AsyncWorkloadOptions>

The AsyncWorkloadOptions which may be configured.

Returns

Task<IReadOnlyCollection<TResult>>

A Task that represents the asynchronous operation. The task result contains an IReadOnlyCollection<T> where the return value of the function delegate worker is stored in the same sequential order as the for loop.

Type Parameters

T1

The type of the first parameter of the function delegate worker.

T2

The type of the second parameter of the function delegate worker.

T3

The type of the third parameter of the function delegate worker.

T4

The type of the fourth parameter of the function delegate worker.

T5

The type of the fifth parameter of the function delegate worker.

TResult

The type of the return value of the function delegate worker.