Class ParallelFactory
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(int, int, Action<int>, Action<AsyncTaskFactoryOptions>)
Executes a parallel for loop.
public static void For(int fromInclusive, int toExclusive, Action<int> worker, Action<AsyncTaskFactoryOptions> setup = null)
Parameters
fromInclusiveintThe start index, inclusive.
toExclusiveintThe end index, exclusive.
workerAction<int>The delegate that is invoked once per iteration.
setupAction<AsyncTaskFactoryOptions>The AsyncTaskFactoryOptions which may be configured.
For(long, long, Action<long>, Action<AsyncTaskFactoryOptions>)
Executes a parallel for loop.
public static void For(long fromInclusive, long toExclusive, Action<long> worker, Action<AsyncTaskFactoryOptions> setup = null)
Parameters
fromInclusivelongThe start index, inclusive.
toExclusivelongThe end index, exclusive.
workerAction<long>The delegate that is invoked once per iteration.
setupAction<AsyncTaskFactoryOptions>The AsyncTaskFactoryOptions which may be configured.
ForAsync(int, int, Func<int, 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
fromInclusiveintThe start index, inclusive.
toExclusiveintThe end index, exclusive.
workerFunc<int, CancellationToken, Task>The delegate that is invoked once per iteration.
setupAction<AsyncWorkloadOptions>The AsyncWorkloadOptions which may be configured.
Returns
ForAsync(long, long, Func<long, 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
fromInclusivelongThe start index, inclusive.
toExclusivelongThe end index, exclusive.
workerFunc<long, CancellationToken, Task>The delegate that is invoked once per iteration.
setupAction<AsyncWorkloadOptions>The AsyncWorkloadOptions which may be configured.
Returns
ForAsync<T>(int, int, Func<int, 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
fromInclusiveintThe start index, inclusive.
toExclusiveintThe end index, exclusive.
workerFunc<int, T, CancellationToken, Task>The delegate that is invoked once per iteration.
argTThe parameter of the delegate
worker.setupAction<AsyncWorkloadOptions>The AsyncWorkloadOptions which may be configured.
Returns
Type Parameters
TThe type of the parameter of the delegate
worker.
ForAsync<T>(long, long, Func<long, 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
fromInclusivelongThe start index, inclusive.
toExclusivelongThe end index, exclusive.
workerFunc<long, T, CancellationToken, Task>The delegate that is invoked once per iteration.
argTThe parameter of the delegate
worker.setupAction<AsyncWorkloadOptions>The AsyncWorkloadOptions which may be configured.
Returns
Type Parameters
TThe type of the parameter of the delegate
worker.
ForAsync<T1, T2>(int, int, Func<int, 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
fromInclusiveintThe start index, inclusive.
toExclusiveintThe end index, exclusive.
workerFunc<int, T1, T2, CancellationToken, Task>The delegate that is invoked once per iteration.
arg1T1The first parameter of the delegate
worker.arg2T2The second parameter of the delegate
worker.setupAction<AsyncWorkloadOptions>The AsyncWorkloadOptions which may be configured.
Returns
Type Parameters
T1The type of the first parameter of the delegate
worker.T2The type of the second parameter of the delegate
worker.
ForAsync<T1, T2>(long, long, Func<long, 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
fromInclusivelongThe start index, inclusive.
toExclusivelongThe end index, exclusive.
workerFunc<long, T1, T2, CancellationToken, Task>The delegate that is invoked once per iteration.
arg1T1The first parameter of the delegate
worker.arg2T2The second parameter of the delegate
worker.setupAction<AsyncWorkloadOptions>The AsyncWorkloadOptions which may be configured.
Returns
Type Parameters
T1The type of the first parameter of the delegate
worker.T2The type of the second parameter of the delegate
worker.
ForAsync<T1, T2, T3>(int, int, Func<int, 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
fromInclusiveintThe start index, inclusive.
toExclusiveintThe end index, exclusive.
workerFunc<int, T1, T2, T3, CancellationToken, Task>The delegate that is invoked once per iteration.
arg1T1The first parameter of the delegate
worker.arg2T2The second parameter of the delegate
worker.arg3T3The third parameter of the delegate
worker.setupAction<AsyncWorkloadOptions>The AsyncWorkloadOptions which may be configured.
Returns
Type Parameters
T1The type of the first parameter of the delegate
worker.T2The type of the second parameter of the delegate
worker.T3The type of the third parameter of the delegate
worker.
ForAsync<T1, T2, T3>(long, long, Func<long, 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
fromInclusivelongThe start index, inclusive.
toExclusivelongThe end index, exclusive.
workerFunc<long, T1, T2, T3, CancellationToken, Task>The delegate that is invoked once per iteration.
arg1T1The first parameter of the delegate
worker.arg2T2The second parameter of the delegate
worker.arg3T3The third parameter of the delegate
worker.setupAction<AsyncWorkloadOptions>The AsyncWorkloadOptions which may be configured.
Returns
Type Parameters
T1The type of the first parameter of the delegate
worker.T2The type of the second parameter of the delegate
worker.T3The type of the third parameter of the delegate
worker.
ForAsync<T1, T2, T3, T4>(int, int, Func<int, 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
fromInclusiveintThe start index, inclusive.
toExclusiveintThe end index, exclusive.
workerFunc<int, T1, T2, T3, T4, CancellationToken, Task>The delegate that is invoked once per iteration.
arg1T1The first parameter of the delegate
worker.arg2T2The second parameter of the delegate
worker.arg3T3The third parameter of the delegate
worker.arg4T4The fourth parameter of the delegate
worker.setupAction<AsyncWorkloadOptions>The AsyncWorkloadOptions which may be configured.
Returns
Type Parameters
T1The type of the first parameter of the delegate
worker.T2The type of the second parameter of the delegate
worker.T3The type of the third parameter of the delegate
worker.T4The type of the fourth parameter of the delegate
worker.
ForAsync<T1, T2, T3, T4>(long, long, Func<long, 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
fromInclusivelongThe start index, inclusive.
toExclusivelongThe end index, exclusive.
workerFunc<long, T1, T2, T3, T4, CancellationToken, Task>The delegate that is invoked once per iteration.
arg1T1The first parameter of the delegate
worker.arg2T2The second parameter of the delegate
worker.arg3T3The third parameter of the delegate
worker.arg4T4The fourth parameter of the delegate
worker.setupAction<AsyncWorkloadOptions>The AsyncWorkloadOptions which may be configured.
Returns
Type Parameters
T1The type of the first parameter of the delegate
worker.T2The type of the second parameter of the delegate
worker.T3The type of the third parameter of the delegate
worker.T4The type of the fourth parameter of the delegate
worker.
ForAsync<T1, T2, T3, T4, T5>(int, int, Func<int, 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
fromInclusiveintThe start index, inclusive.
toExclusiveintThe end index, exclusive.
workerFunc<int, T1, T2, T3, T4, T5, CancellationToken, Task>The delegate that is invoked once per iteration.
arg1T1The first parameter of the delegate
worker.arg2T2The second parameter of the delegate
worker.arg3T3The third parameter of the delegate
worker.arg4T4The fourth parameter of the delegate
worker.arg5T5The fifth parameter of the delegate
worker.setupAction<AsyncWorkloadOptions>The AsyncWorkloadOptions which may be configured.
Returns
Type Parameters
T1The type of the first parameter of the delegate
worker.T2The type of the second parameter of the delegate
worker.T3The type of the third parameter of the delegate
worker.T4The type of the fourth parameter of the delegate
worker.T5The type of the fifth parameter of the delegate
worker.
ForAsync<T1, T2, T3, T4, T5>(long, long, Func<long, 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
fromInclusivelongThe start index, inclusive.
toExclusivelongThe end index, exclusive.
workerFunc<long, T1, T2, T3, T4, T5, CancellationToken, Task>The delegate that is invoked once per iteration.
arg1T1The first parameter of the delegate
worker.arg2T2The second parameter of the delegate
worker.arg3T3The third parameter of the delegate
worker.arg4T4The fourth parameter of the delegate
worker.arg5T5The fifth parameter of the delegate
worker.setupAction<AsyncWorkloadOptions>The AsyncWorkloadOptions which may be configured.
Returns
Type Parameters
T1The type of the first parameter of the delegate
worker.T2The type of the second parameter of the delegate
worker.T3The type of the third parameter of the delegate
worker.T4The type of the fourth parameter of the delegate
worker.T5The 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
sourceIEnumerable<TSource>The sequence to iterate over parallel.
workerFunc<TSource, CancellationToken, Task>The delegate that is invoked once per iteration.
setupAction<AsyncWorkloadOptions>The AsyncWorkloadOptions which may be configured.
Returns
Type Parameters
TSourceThe 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
sourceIEnumerable<TSource>The sequence to iterate over parallel.
workerFunc<TSource, T, CancellationToken, Task>The delegate that is invoked once per iteration.
argTThe parameter of the delegate
worker.setupAction<AsyncWorkloadOptions>The AsyncWorkloadOptions which may be configured.
Returns
Type Parameters
TSourceThe type of the data in the source.
TThe 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
sourceIEnumerable<TSource>The sequence to iterate over parallel.
workerFunc<TSource, T1, T2, CancellationToken, Task>The delegate that is invoked once per iteration.
arg1T1The first parameter of the delegate
worker.arg2T2The second parameter of the delegate
worker.setupAction<AsyncWorkloadOptions>The AsyncWorkloadOptions which may be configured.
Returns
Type Parameters
TSourceThe type of the data in the source.
T1The type of the first parameter of the delegate
worker.T2The 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
sourceIEnumerable<TSource>The sequence to iterate over parallel.
workerFunc<TSource, T1, T2, T3, CancellationToken, Task>The delegate that is invoked once per iteration.
arg1T1The first parameter of the delegate
worker.arg2T2The second parameter of the delegate
worker.arg3T3The third parameter of the delegate
worker.setupAction<AsyncWorkloadOptions>The AsyncWorkloadOptions which may be configured.
Returns
Type Parameters
TSourceThe type of the data in the source.
T1The type of the first parameter of the delegate
worker.T2The type of the second parameter of the delegate
worker.T3The 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
sourceIEnumerable<TSource>The sequence to iterate over parallel.
workerFunc<TSource, T1, T2, T3, T4, CancellationToken, Task>The delegate that is invoked once per iteration.
arg1T1The first parameter of the delegate
worker.arg2T2The second parameter of the delegate
worker.arg3T3The third parameter of the delegate
worker.arg4T4The fourth parameter of the delegate
worker.setupAction<AsyncWorkloadOptions>The AsyncWorkloadOptions which may be configured.
Returns
Type Parameters
TSourceThe type of the data in the source.
T1The type of the first parameter of the delegate
worker.T2The type of the second parameter of the delegate
worker.T3The type of the third parameter of the delegate
worker.T4The 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
sourceIEnumerable<TSource>The sequence to iterate over parallel.
workerFunc<TSource, T1, T2, T3, T4, T5, CancellationToken, Task>The delegate that is invoked once per iteration.
arg1T1The first parameter of the delegate
worker.arg2T2The second parameter of the delegate
worker.arg3T3The third parameter of the delegate
worker.arg4T4The fourth parameter of the delegate
worker.arg5T5The fifth parameter of the delegate
worker.setupAction<AsyncWorkloadOptions>The AsyncWorkloadOptions which may be configured.
Returns
Type Parameters
TSourceThe type of the data in the source.
T1The type of the first parameter of the delegate
worker.T2The type of the second parameter of the delegate
worker.T3The type of the third parameter of the delegate
worker.T4The type of the fourth parameter of the delegate
worker.T5The type of the fifth parameter of the 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
sourceIEnumerable<TSource>The sequence to iterate over parallel.
workerFunc<TSource, CancellationToken, Task<TResult>>The delegate that is invoked once per iteration.
setupAction<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
workeris stored in the same sequential order assource.
Type Parameters
TSourceThe type of the data in the source.
TResultThe 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
sourceIEnumerable<TSource>The sequence to iterate over parallel.
workerFunc<TSource, T, CancellationToken, Task<TResult>>The delegate that is invoked once per iteration.
argTThe parameter of the function delegate
worker.setupAction<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
workeris stored in the same sequential order assource.
Type Parameters
TSourceThe type of the data in the source.
TThe type of the parameter of the function delegate
worker.TResultThe 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
sourceIEnumerable<TSource>The sequence to iterate over parallel.
workerFunc<TSource, T1, T2, CancellationToken, Task<TResult>>The delegate that is invoked once per iteration.
arg1T1The first parameter of the function delegate
worker.arg2T2The second parameter of the function delegate
worker.setupAction<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
workeris stored in the same sequential order assource.
Type Parameters
TSourceThe type of the data in the source.
T1The type of the first parameter of the function delegate
worker.T2The type of the second parameter of the function delegate
worker.TResultThe 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
sourceIEnumerable<TSource>The sequence to iterate over parallel.
workerFunc<TSource, T1, T2, T3, CancellationToken, Task<TResult>>The delegate that is invoked once per iteration.
arg1T1The first parameter of the function delegate
worker.arg2T2The second parameter of the function delegate
worker.arg3T3The third parameter of the function delegate
worker.setupAction<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
workeris stored in the same sequential order assource.
Type Parameters
TSourceThe type of the data in the source.
T1The type of the first parameter of the function delegate
worker.T2The type of the second parameter of the function delegate
worker.T3The type of the third parameter of the function delegate
worker.TResultThe 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
sourceIEnumerable<TSource>The sequence to iterate over parallel.
workerFunc<TSource, T1, T2, T3, T4, CancellationToken, Task<TResult>>The delegate that is invoked once per iteration.
arg1T1The first parameter of the function delegate
worker.arg2T2The second parameter of the function delegate
worker.arg3T3The third parameter of the function delegate
worker.arg4T4The fourth parameter of the function delegate
worker.setupAction<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
workeris stored in the same sequential order assource.
Type Parameters
TSourceThe type of the data in the source.
T1The type of the first parameter of the function delegate
worker.T2The type of the second parameter of the function delegate
worker.T3The type of the third parameter of the function delegate
worker.T4The type of the fourth parameter of the function delegate
worker.TResultThe 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
sourceIEnumerable<TSource>The sequence to iterate over parallel.
workerFunc<TSource, T1, T2, T3, T4, T5, CancellationToken, Task<TResult>>The delegate that is invoked once per iteration.
arg1T1The first parameter of the function delegate
worker.arg2T2The second parameter of the function delegate
worker.arg3T3The third parameter of the function delegate
worker.arg4T4The fourth parameter of the function delegate
worker.arg5T5The fifth parameter of the function delegate
worker.setupAction<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
workeris stored in the same sequential order assource.
Type Parameters
TSourceThe type of the data in the source.
T1The type of the first parameter of the function delegate
worker.T2The type of the second parameter of the function delegate
worker.T3The type of the third parameter of the function delegate
worker.T4The type of the fourth parameter of the function delegate
worker.T5The type of the fifth parameter of the function delegate
worker.TResultThe type of the return value of the function 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
sourceIEnumerable<TSource>The sequence to iterate over parallel.
workerFunc<TSource, TResult>The delegate that is invoked once per iteration.
setupAction<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
workeris stored in the same sequential order assource.
Type Parameters
TSourceThe type of the data in the source.
TResultThe 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
sourceIEnumerable<TSource>The sequence to iterate over parallel.
workerFunc<TSource, T, TResult>The delegate that is invoked once per iteration.
argTThe parameter of the function delegate
worker.setupAction<AsyncTaskFactoryOptions>The AsyncTaskFactoryOptions which may be configured.
Returns
- IReadOnlyCollection<TResult>
An IReadOnlyCollection<T> where the return value of the function delegate
workeris stored in the same sequential order assource.
Type Parameters
TSourceThe type of the data in the source.
TThe type of the parameter of the function delegate
worker.TResultThe 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
sourceIEnumerable<TSource>The sequence to iterate over parallel.
workerFunc<TSource, T1, T2, TResult>The delegate that is invoked once per iteration.
arg1T1The first parameter of the function delegate
worker.arg2T2The second parameter of the function delegate
worker.setupAction<AsyncTaskFactoryOptions>The AsyncTaskFactoryOptions which may be configured.
Returns
- IReadOnlyCollection<TResult>
An IReadOnlyCollection<T> where the return value of the function delegate
workeris stored in the same sequential order assource.
Type Parameters
TSourceThe type of the data in the source.
T1The type of the first parameter of the function delegate
worker.T2The type of the second parameter of the function delegate
worker.TResultThe 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
sourceIEnumerable<TSource>The sequence to iterate over parallel.
workerFunc<TSource, T1, T2, T3, TResult>The delegate that is invoked once per iteration.
arg1T1The first parameter of the function delegate
worker.arg2T2The second parameter of the function delegate
worker.arg3T3The third parameter of the function delegate
worker.setupAction<AsyncTaskFactoryOptions>The AsyncTaskFactoryOptions which may be configured.
Returns
- IReadOnlyCollection<TResult>
An IReadOnlyCollection<T> where the return value of the function delegate
workeris stored in the same sequential order assource.
Type Parameters
TSourceThe type of the data in the source.
T1The type of the first parameter of the function delegate
worker.T2The type of the second parameter of the function delegate
worker.T3The type of the third parameter of the function delegate
worker.TResultThe 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
sourceIEnumerable<TSource>The sequence to iterate over parallel.
workerFunc<TSource, T1, T2, T3, T4, TResult>The delegate that is invoked once per iteration.
arg1T1The first parameter of the function delegate
worker.arg2T2The second parameter of the function delegate
worker.arg3T3The third parameter of the function delegate
worker.arg4T4The fourth parameter of the function delegate
worker.setupAction<AsyncTaskFactoryOptions>The AsyncTaskFactoryOptions which may be configured.
Returns
- IReadOnlyCollection<TResult>
An IReadOnlyCollection<T> where the return value of the function delegate
workeris stored in the same sequential order assource.
Type Parameters
TSourceThe type of the data in the source.
T1The type of the first parameter of the function delegate
worker.T2The type of the second parameter of the function delegate
worker.T3The type of the third parameter of the function delegate
worker.T4The type of the fourth parameter of the function delegate
worker.TResultThe 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
sourceIEnumerable<TSource>The sequence to iterate over parallel.
workerFunc<TSource, T1, T2, T3, T4, T5, TResult>The delegate that is invoked once per iteration.
arg1T1The first parameter of the function delegate
worker.arg2T2The second parameter of the function delegate
worker.arg3T3The third parameter of the function delegate
worker.arg4T4The fourth parameter of the function delegate
worker.arg5T5The fifth parameter of the function delegate
worker.setupAction<AsyncTaskFactoryOptions>The AsyncTaskFactoryOptions which may be configured.
Returns
- IReadOnlyCollection<TResult>
An IReadOnlyCollection<T> where the return value of the function delegate
workeris stored in the same sequential order assource.
Type Parameters
TSourceThe type of the data in the source.
T1The type of the first parameter of the function delegate
worker.T2The type of the second parameter of the function delegate
worker.T3The type of the third parameter of the function delegate
worker.T4The type of the fourth parameter of the function delegate
worker.T5The type of the fifth parameter of the function delegate
worker.TResultThe type of the return value of the function 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
sourceIEnumerable<TSource>The sequence to iterate over parallel.
workerAction<TSource>The delegate that is invoked once per iteration.
setupAction<AsyncTaskFactoryOptions>The AsyncTaskFactoryOptions which may be configured.
Type Parameters
TSourceThe 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
sourceIEnumerable<TSource>The sequence to iterate over parallel.
workerAction<TSource, T>The delegate that is invoked once per iteration.
argTThe parameter of the delegate
worker.setupAction<AsyncTaskFactoryOptions>The AsyncTaskFactoryOptions which may be configured.
Type Parameters
TSourceThe type of the data in the source.
TThe 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
sourceIEnumerable<TSource>The sequence to iterate over parallel.
workerAction<TSource, T1, T2>The delegate that is invoked once per iteration.
arg1T1The first parameter of the delegate
worker.arg2T2The second parameter of the delegate
worker.setupAction<AsyncTaskFactoryOptions>The AsyncTaskFactoryOptions which may be configured.
Type Parameters
TSourceThe type of the data in the source.
T1The type of the first parameter of the delegate
worker.T2The 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
sourceIEnumerable<TSource>The sequence to iterate over parallel.
workerAction<TSource, T1, T2, T3>The delegate that is invoked once per iteration.
arg1T1The first parameter of the delegate
worker.arg2T2The second parameter of the delegate
worker.arg3T3The third parameter of the delegate
worker.setupAction<AsyncTaskFactoryOptions>The AsyncTaskFactoryOptions which may be configured.
Type Parameters
TSourceThe type of the data in the source.
T1The type of the first parameter of the delegate
worker.T2The type of the second parameter of the delegate
worker.T3The 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
sourceIEnumerable<TSource>The sequence to iterate over parallel.
workerAction<TSource, T1, T2, T3, T4>The delegate that is invoked once per iteration.
arg1T1The first parameter of the delegate
worker.arg2T2The second parameter of the delegate
worker.arg3T3The third parameter of the delegate
worker.arg4T4The fourth parameter of the delegate
worker.setupAction<AsyncTaskFactoryOptions>The AsyncTaskFactoryOptions which may be configured.
Type Parameters
TSourceThe type of the data in the source.
T1The type of the first parameter of the delegate
worker.T2The type of the second parameter of the delegate
worker.T3The type of the third parameter of the delegate
worker.T4The 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
sourceIEnumerable<TSource>The sequence to iterate over parallel.
workerAction<TSource, T1, T2, T3, T4, T5>The delegate that is invoked once per iteration.
arg1T1The first parameter of the delegate
worker.arg2T2The second parameter of the delegate
worker.arg3T3The third parameter of the delegate
worker.arg4T4The fourth parameter of the delegate
worker.arg5T5The fifth parameter of the delegate
worker.setupAction<AsyncTaskFactoryOptions>The AsyncTaskFactoryOptions which may be configured.
Type Parameters
TSourceThe type of the data in the source.
T1The type of the first parameter of the delegate
worker.T2The type of the second parameter of the delegate
worker.T3The type of the third parameter of the delegate
worker.T4The type of the fourth parameter of the delegate
worker.T5The type of the fifth parameter of the delegate
worker.
ForResultAsync<TResult>(int, int, Func<int, 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
fromInclusiveintThe start index, inclusive.
toExclusiveintThe end index, exclusive.
workerFunc<int, CancellationToken, Task<TResult>>The delegate that is invoked once per iteration.
setupAction<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
workeris stored in the same sequential order as the for loop.
Type Parameters
TResultThe type of the return value of the function delegate
worker.
ForResultAsync<TResult>(long, long, Func<long, 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
fromInclusivelongThe start index, inclusive.
toExclusivelongThe end index, exclusive.
workerFunc<long, CancellationToken, Task<TResult>>The delegate that is invoked once per iteration.
setupAction<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
workeris stored in the same sequential order as the for loop.
Type Parameters
TResultThe type of the return value of the function delegate
worker.
ForResultAsync<T, TResult>(int, int, Func<int, 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
fromInclusiveintThe start index, inclusive.
toExclusiveintThe end index, exclusive.
workerFunc<int, T, CancellationToken, Task<TResult>>The delegate that is invoked once per iteration.
argTThe parameter of the function delegate
worker.setupAction<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
workeris stored in the same sequential order as the for loop.
Type Parameters
TThe type of the parameter of the function delegate
worker.TResultThe type of the return value of the function delegate
worker.
ForResultAsync<T, TResult>(long, long, Func<long, 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
fromInclusivelongThe start index, inclusive.
toExclusivelongThe end index, exclusive.
workerFunc<long, T, CancellationToken, Task<TResult>>The delegate that is invoked once per iteration.
argTThe parameter of the function delegate
worker.setupAction<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
workeris stored in the same sequential order as the for loop.
Type Parameters
TThe type of the parameter of the function delegate
worker.TResultThe type of the return value of the function delegate
worker.
ForResultAsync<T1, T2, TResult>(int, int, Func<int, 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
fromInclusiveintThe start index, inclusive.
toExclusiveintThe end index, exclusive.
workerFunc<int, T1, T2, CancellationToken, Task<TResult>>The delegate that is invoked once per iteration.
arg1T1The first parameter of the function delegate
worker.arg2T2The second parameter of the function delegate
worker.setupAction<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
workeris stored in the same sequential order as the for loop.
Type Parameters
T1The type of the first parameter of the function delegate
worker.T2The type of the second parameter of the function delegate
worker.TResultThe type of the return value of the function delegate
worker.
ForResultAsync<T1, T2, TResult>(long, long, Func<long, 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
fromInclusivelongThe start index, inclusive.
toExclusivelongThe end index, exclusive.
workerFunc<long, T1, T2, CancellationToken, Task<TResult>>The delegate that is invoked once per iteration.
arg1T1The first parameter of the function delegate
worker.arg2T2The second parameter of the function delegate
worker.setupAction<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
workeris stored in the same sequential order as the for loop.
Type Parameters
T1The type of the first parameter of the function delegate
worker.T2The type of the second parameter of the function delegate
worker.TResultThe type of the return value of the function delegate
worker.
ForResultAsync<T1, T2, T3, TResult>(int, int, Func<int, 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
fromInclusiveintThe start index, inclusive.
toExclusiveintThe end index, exclusive.
workerFunc<int, T1, T2, T3, CancellationToken, Task<TResult>>The delegate that is invoked once per iteration.
arg1T1The first parameter of the function delegate
worker.arg2T2The second parameter of the function delegate
worker.arg3T3The third parameter of the function delegate
worker.setupAction<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
workeris stored in the same sequential order as the for loop.
Type Parameters
T1The type of the first parameter of the function delegate
worker.T2The type of the second parameter of the function delegate
worker.T3The type of the third parameter of the function delegate
worker.TResultThe type of the return value of the function delegate
worker.
ForResultAsync<T1, T2, T3, TResult>(long, long, Func<long, 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
fromInclusivelongThe start index, inclusive.
toExclusivelongThe end index, exclusive.
workerFunc<long, T1, T2, T3, CancellationToken, Task<TResult>>The delegate that is invoked once per iteration.
arg1T1The first parameter of the function delegate
worker.arg2T2The second parameter of the function delegate
worker.arg3T3The third parameter of the function delegate
worker.setupAction<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
workeris stored in the same sequential order as the for loop.
Type Parameters
T1The type of the first parameter of the function delegate
worker.T2The type of the second parameter of the function delegate
worker.T3The type of the third parameter of the function delegate
worker.TResultThe type of the return value of the function delegate
worker.
ForResultAsync<T1, T2, T3, T4, TResult>(int, int, Func<int, 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
fromInclusiveintThe start index, inclusive.
toExclusiveintThe end index, exclusive.
workerFunc<int, T1, T2, T3, T4, CancellationToken, Task<TResult>>The delegate that is invoked once per iteration.
arg1T1The first parameter of the function delegate
worker.arg2T2The second parameter of the function delegate
worker.arg3T3The third parameter of the function delegate
worker.arg4T4The fourth parameter of the function delegate
worker.setupAction<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
workeris stored in the same sequential order as the for loop.
Type Parameters
T1The type of the first parameter of the function delegate
worker.T2The type of the second parameter of the function delegate
worker.T3The type of the third parameter of the function delegate
worker.T4The type of the fourth parameter of the function delegate
worker.TResultThe type of the return value of the function delegate
worker.
ForResultAsync<T1, T2, T3, T4, TResult>(long, long, Func<long, 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
fromInclusivelongThe start index, inclusive.
toExclusivelongThe end index, exclusive.
workerFunc<long, T1, T2, T3, T4, CancellationToken, Task<TResult>>The delegate that is invoked once per iteration.
arg1T1The first parameter of the function delegate
worker.arg2T2The second parameter of the function delegate
worker.arg3T3The third parameter of the function delegate
worker.arg4T4The fourth parameter of the function delegate
worker.setupAction<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
workeris stored in the same sequential order as the for loop.
Type Parameters
T1The type of the first parameter of the function delegate
worker.T2The type of the second parameter of the function delegate
worker.T3The type of the third parameter of the function delegate
worker.T4The type of the fourth parameter of the function delegate
worker.TResultThe type of the return value of the function delegate
worker.
ForResultAsync<T1, T2, T3, T4, T5, TResult>(int, int, Func<int, 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
fromInclusiveintThe start index, inclusive.
toExclusiveintThe end index, exclusive.
workerFunc<int, T1, T2, T3, T4, T5, CancellationToken, Task<TResult>>The delegate that is invoked once per iteration.
arg1T1The first parameter of the function delegate
worker.arg2T2The second parameter of the function delegate
worker.arg3T3The third parameter of the function delegate
worker.arg4T4The fourth parameter of the function delegate
worker.arg5T5The fifth parameter of the function delegate
worker.setupAction<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
workeris stored in the same sequential order as the for loop.
Type Parameters
T1The type of the first parameter of the function delegate
worker.T2The type of the second parameter of the function delegate
worker.T3The type of the third parameter of the function delegate
worker.T4The type of the fourth parameter of the function delegate
worker.T5The type of the fifth parameter of the function delegate
worker.TResultThe type of the return value of the function delegate
worker.
ForResultAsync<T1, T2, T3, T4, T5, TResult>(long, long, Func<long, 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
fromInclusivelongThe start index, inclusive.
toExclusivelongThe end index, exclusive.
workerFunc<long, T1, T2, T3, T4, T5, CancellationToken, Task<TResult>>The delegate that is invoked once per iteration.
arg1T1The first parameter of the function delegate
worker.arg2T2The second parameter of the function delegate
worker.arg3T3The third parameter of the function delegate
worker.arg4T4The fourth parameter of the function delegate
worker.arg5T5The fifth parameter of the function delegate
worker.setupAction<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
workeris stored in the same sequential order as the for loop.
Type Parameters
T1The type of the first parameter of the function delegate
worker.T2The type of the second parameter of the function delegate
worker.T3The type of the third parameter of the function delegate
worker.T4The type of the fourth parameter of the function delegate
worker.T5The type of the fifth parameter of the function delegate
worker.TResultThe type of the return value of the function delegate
worker.
ForResult<TResult>(int, int, Func<int, 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
fromInclusiveintThe start index, inclusive.
toExclusiveintThe end index, exclusive.
workerFunc<int, TResult>The delegate that is invoked once per iteration.
setupAction<AsyncTaskFactoryOptions>The AsyncTaskFactoryOptions which may be configured.
Returns
- IReadOnlyCollection<TResult>
An IReadOnlyCollection<T> where the return value of the function delegate
workeris stored in the same sequential order as the for loop.
Type Parameters
TResultThe type of the return value of the function delegate
worker.
ForResult<TResult>(long, long, Func<long, 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
fromInclusivelongThe start index, inclusive.
toExclusivelongThe end index, exclusive.
workerFunc<long, TResult>The delegate that is invoked once per iteration.
setupAction<AsyncTaskFactoryOptions>The AsyncTaskFactoryOptions which may be configured.
Returns
- IReadOnlyCollection<TResult>
An IReadOnlyCollection<T> where the return value of the function delegate
workeris stored in the same sequential order as the for loop.
Type Parameters
TResultThe type of the return value of the function delegate
worker.
ForResult<T, TResult>(int, int, Func<int, 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
fromInclusiveintThe start index, inclusive.
toExclusiveintThe end index, exclusive.
workerFunc<int, T, TResult>The delegate that is invoked once per iteration.
argTThe parameter of the function delegate
worker.setupAction<AsyncTaskFactoryOptions>The AsyncTaskFactoryOptions which may be configured.
Returns
- IReadOnlyCollection<TResult>
An IReadOnlyCollection<T> where the return value of the function delegate
workeris stored in the same sequential order as the for loop.
Type Parameters
TThe type of the parameter of the function delegate
worker.TResultThe type of the return value of the function delegate
worker.
ForResult<T, TResult>(long, long, Func<long, 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
fromInclusivelongThe start index, inclusive.
toExclusivelongThe end index, exclusive.
workerFunc<long, T, TResult>The delegate that is invoked once per iteration.
argTThe parameter of the function delegate
worker.setupAction<AsyncTaskFactoryOptions>The AsyncTaskFactoryOptions which may be configured.
Returns
- IReadOnlyCollection<TResult>
An IReadOnlyCollection<T> where the return value of the function delegate
workeris stored in the same sequential order as the for loop.
Type Parameters
TThe type of the parameter of the function delegate
worker.TResultThe type of the return value of the function delegate
worker.
ForResult<T1, T2, TResult>(int, int, Func<int, 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
fromInclusiveintThe start index, inclusive.
toExclusiveintThe end index, exclusive.
workerFunc<int, T1, T2, TResult>The delegate that is invoked once per iteration.
arg1T1The first parameter of the function delegate
worker.arg2T2The second parameter of the function delegate
worker.setupAction<AsyncTaskFactoryOptions>The AsyncTaskFactoryOptions which may be configured.
Returns
- IReadOnlyCollection<TResult>
An IReadOnlyCollection<T> where the return value of the function delegate
workeris stored in the same sequential order as the for loop.
Type Parameters
T1The type of the first parameter of the function delegate
worker.T2The type of the second parameter of the function delegate
worker.TResultThe type of the return value of the function delegate
worker.
ForResult<T1, T2, TResult>(long, long, Func<long, 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
fromInclusivelongThe start index, inclusive.
toExclusivelongThe end index, exclusive.
workerFunc<long, T1, T2, TResult>The delegate that is invoked once per iteration.
arg1T1The first parameter of the function delegate
worker.arg2T2The second parameter of the function delegate
worker.setupAction<AsyncTaskFactoryOptions>The AsyncTaskFactoryOptions which may be configured.
Returns
- IReadOnlyCollection<TResult>
An IReadOnlyCollection<T> where the return value of the function delegate
workeris stored in the same sequential order as the for loop.
Type Parameters
T1The type of the first parameter of the function delegate
worker.T2The type of the second parameter of the function delegate
worker.TResultThe type of the return value of the function delegate
worker.
ForResult<T1, T2, T3, TResult>(int, int, Func<int, 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
fromInclusiveintThe start index, inclusive.
toExclusiveintThe end index, exclusive.
workerFunc<int, T1, T2, T3, TResult>The delegate that is invoked once per iteration.
arg1T1The first parameter of the function delegate
worker.arg2T2The second parameter of the function delegate
worker.arg3T3The third parameter of the function delegate
worker.setupAction<AsyncTaskFactoryOptions>The AsyncTaskFactoryOptions which may be configured.
Returns
- IReadOnlyCollection<TResult>
An IReadOnlyCollection<T> where the return value of the function delegate
workeris stored in the same sequential order as the for loop.
Type Parameters
T1The type of the first parameter of the function delegate
worker.T2The type of the second parameter of the function delegate
worker.T3The type of the third parameter of the function delegate
worker.TResultThe type of the return value of the function delegate
worker.
ForResult<T1, T2, T3, TResult>(long, long, Func<long, 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
fromInclusivelongThe start index, inclusive.
toExclusivelongThe end index, exclusive.
workerFunc<long, T1, T2, T3, TResult>The delegate that is invoked once per iteration.
arg1T1The first parameter of the function delegate
worker.arg2T2The second parameter of the function delegate
worker.arg3T3The third parameter of the function delegate
worker.setupAction<AsyncTaskFactoryOptions>The AsyncTaskFactoryOptions which may be configured.
Returns
- IReadOnlyCollection<TResult>
An IReadOnlyCollection<T> where the return value of the function delegate
workeris stored in the same sequential order as the for loop.
Type Parameters
T1The type of the first parameter of the function delegate
worker.T2The type of the second parameter of the function delegate
worker.T3The type of the third parameter of the function delegate
worker.TResultThe type of the return value of the function delegate
worker.
ForResult<T1, T2, T3, T4, TResult>(int, int, Func<int, 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
fromInclusiveintThe start index, inclusive.
toExclusiveintThe end index, exclusive.
workerFunc<int, T1, T2, T3, T4, TResult>The delegate that is invoked once per iteration.
arg1T1The first parameter of the function delegate
worker.arg2T2The second parameter of the function delegate
worker.arg3T3The third parameter of the function delegate
worker.arg4T4The fourth parameter of the function delegate
worker.setupAction<AsyncTaskFactoryOptions>The AsyncTaskFactoryOptions which may be configured.
Returns
- IReadOnlyCollection<TResult>
An IReadOnlyCollection<T> where the return value of the function delegate
workeris stored in the same sequential order as the for loop.
Type Parameters
T1The type of the first parameter of the function delegate
worker.T2The type of the second parameter of the function delegate
worker.T3The type of the third parameter of the function delegate
worker.T4The type of the fourth parameter of the function delegate
worker.TResultThe type of the return value of the function delegate
worker.
ForResult<T1, T2, T3, T4, TResult>(long, long, Func<long, 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
fromInclusivelongThe start index, inclusive.
toExclusivelongThe end index, exclusive.
workerFunc<long, T1, T2, T3, T4, TResult>The delegate that is invoked once per iteration.
arg1T1The first parameter of the function delegate
worker.arg2T2The second parameter of the function delegate
worker.arg3T3The third parameter of the function delegate
worker.arg4T4The fourth parameter of the function delegate
worker.setupAction<AsyncTaskFactoryOptions>The AsyncTaskFactoryOptions which may be configured.
Returns
- IReadOnlyCollection<TResult>
An IReadOnlyCollection<T> where the return value of the function delegate
workeris stored in the same sequential order as the for loop.
Type Parameters
T1The type of the first parameter of the function delegate
worker.T2The type of the second parameter of the function delegate
worker.T3The type of the third parameter of the function delegate
worker.T4The type of the fourth parameter of the function delegate
worker.TResultThe type of the return value of the function delegate
worker.
ForResult<T1, T2, T3, T4, T5, TResult>(int, int, Func<int, 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
fromInclusiveintThe start index, inclusive.
toExclusiveintThe end index, exclusive.
workerFunc<int, T1, T2, T3, T4, T5, TResult>The delegate that is invoked once per iteration.
arg1T1The first parameter of the function delegate
worker.arg2T2The second parameter of the function delegate
worker.arg3T3The third parameter of the function delegate
worker.arg4T4The fourth parameter of the function delegate
worker.arg5T5The fifth parameter of the function delegate
worker.setupAction<AsyncTaskFactoryOptions>The AsyncTaskFactoryOptions which may be configured.
Returns
- IReadOnlyCollection<TResult>
An IReadOnlyCollection<T> where the return value of the function delegate
workeris stored in the same sequential order as the for loop.
Type Parameters
T1The type of the first parameter of the function delegate
worker.T2The type of the second parameter of the function delegate
worker.T3The type of the third parameter of the function delegate
worker.T4The type of the fourth parameter of the function delegate
worker.T5The type of the fifth parameter of the function delegate
worker.TResultThe type of the return value of the function delegate
worker.
ForResult<T1, T2, T3, T4, T5, TResult>(long, long, Func<long, 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
fromInclusivelongThe start index, inclusive.
toExclusivelongThe end index, exclusive.
workerFunc<long, T1, T2, T3, T4, T5, TResult>The delegate that is invoked once per iteration.
arg1T1The first parameter of the function delegate
worker.arg2T2The second parameter of the function delegate
worker.arg3T3The third parameter of the function delegate
worker.arg4T4The fourth parameter of the function delegate
worker.arg5T5The fifth parameter of the function delegate
worker.setupAction<AsyncTaskFactoryOptions>The AsyncTaskFactoryOptions which may be configured.
Returns
- IReadOnlyCollection<TResult>
An IReadOnlyCollection<T> where the return value of the function delegate
workeris stored in the same sequential order as the for loop.
Type Parameters
T1The type of the first parameter of the function delegate
worker.T2The type of the second parameter of the function delegate
worker.T3The type of the third parameter of the function delegate
worker.T4The type of the fourth parameter of the function delegate
worker.T5The type of the fifth parameter of the function delegate
worker.TResultThe type of the return value of the function delegate
worker.
For<T>(int, int, Action<int, 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
fromInclusiveintThe start index, inclusive.
toExclusiveintThe end index, exclusive.
workerAction<int, T>The delegate that is invoked once per iteration.
argTThe parameter of the delegate
worker.setupAction<AsyncTaskFactoryOptions>The AsyncTaskFactoryOptions which may be configured.
Type Parameters
TThe type of the parameter of the delegate
worker.
For<T>(long, long, Action<long, 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
fromInclusivelongThe start index, inclusive.
toExclusivelongThe end index, exclusive.
workerAction<long, T>The delegate that is invoked once per iteration.
argTThe parameter of the delegate
worker.setupAction<AsyncTaskFactoryOptions>The AsyncTaskFactoryOptions which may be configured.
Type Parameters
TThe type of the parameter of the delegate
worker.
For<T1, T2>(int, int, Action<int, 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
fromInclusiveintThe start index, inclusive.
toExclusiveintThe end index, exclusive.
workerAction<int, T1, T2>The delegate that is invoked once per iteration.
arg1T1The first parameter of the delegate
worker.arg2T2The second parameter of the delegate
worker.setupAction<AsyncTaskFactoryOptions>The AsyncTaskFactoryOptions which may be configured.
Type Parameters
T1The type of the first parameter of the delegate
worker.T2The type of the second parameter of the delegate
worker.
For<T1, T2>(long, long, Action<long, 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
fromInclusivelongThe start index, inclusive.
toExclusivelongThe end index, exclusive.
workerAction<long, T1, T2>The delegate that is invoked once per iteration.
arg1T1The first parameter of the delegate
worker.arg2T2The second parameter of the delegate
worker.setupAction<AsyncTaskFactoryOptions>The AsyncTaskFactoryOptions which may be configured.
Type Parameters
T1The type of the first parameter of the delegate
worker.T2The type of the second parameter of the delegate
worker.
For<T1, T2, T3>(int, int, Action<int, 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
fromInclusiveintThe start index, inclusive.
toExclusiveintThe end index, exclusive.
workerAction<int, T1, T2, T3>The delegate that is invoked once per iteration.
arg1T1The first parameter of the delegate
worker.arg2T2The second parameter of the delegate
worker.arg3T3The third parameter of the delegate
worker.setupAction<AsyncTaskFactoryOptions>The AsyncTaskFactoryOptions which may be configured.
Type Parameters
T1The type of the first parameter of the delegate
worker.T2The type of the second parameter of the delegate
worker.T3The type of the third parameter of the delegate
worker.
For<T1, T2, T3>(long, long, Action<long, 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
fromInclusivelongThe start index, inclusive.
toExclusivelongThe end index, exclusive.
workerAction<long, T1, T2, T3>The delegate that is invoked once per iteration.
arg1T1The first parameter of the delegate
worker.arg2T2The second parameter of the delegate
worker.arg3T3The third parameter of the delegate
worker.setupAction<AsyncTaskFactoryOptions>The AsyncTaskFactoryOptions which may be configured.
Type Parameters
T1The type of the first parameter of the delegate
worker.T2The type of the second parameter of the delegate
worker.T3The type of the third parameter of the delegate
worker.
For<T1, T2, T3, T4>(int, int, Action<int, 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
fromInclusiveintThe start index, inclusive.
toExclusiveintThe end index, exclusive.
workerAction<int, T1, T2, T3, T4>The delegate that is invoked once per iteration.
arg1T1The first parameter of the delegate
worker.arg2T2The second parameter of the delegate
worker.arg3T3The third parameter of the delegate
worker.arg4T4The fourth parameter of the delegate
worker.setupAction<AsyncTaskFactoryOptions>The AsyncTaskFactoryOptions which may be configured.
Type Parameters
T1The type of the first parameter of the delegate
worker.T2The type of the second parameter of the delegate
worker.T3The type of the third parameter of the delegate
worker.T4The type of the fourth parameter of the delegate
worker.
For<T1, T2, T3, T4>(long, long, Action<long, 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
fromInclusivelongThe start index, inclusive.
toExclusivelongThe end index, exclusive.
workerAction<long, T1, T2, T3, T4>The delegate that is invoked once per iteration.
arg1T1The first parameter of the delegate
worker.arg2T2The second parameter of the delegate
worker.arg3T3The third parameter of the delegate
worker.arg4T4The fourth parameter of the delegate
worker.setupAction<AsyncTaskFactoryOptions>The AsyncTaskFactoryOptions which may be configured.
Type Parameters
T1The type of the first parameter of the delegate
worker.T2The type of the second parameter of the delegate
worker.T3The type of the third parameter of the delegate
worker.T4The type of the fourth parameter of the delegate
worker.
For<T1, T2, T3, T4, T5>(int, int, Action<int, 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
fromInclusiveintThe start index, inclusive.
toExclusiveintThe end index, exclusive.
workerAction<int, T1, T2, T3, T4, T5>The delegate that is invoked once per iteration.
arg1T1The first parameter of the delegate
worker.arg2T2The second parameter of the delegate
worker.arg3T3The third parameter of the delegate
worker.arg4T4The fourth parameter of the delegate
worker.arg5T5The fifth parameter of the delegate
worker.setupAction<AsyncTaskFactoryOptions>The AsyncTaskFactoryOptions which may be configured.
Type Parameters
T1The type of the first parameter of the delegate
worker.T2The type of the second parameter of the delegate
worker.T3The type of the third parameter of the delegate
worker.T4The type of the fourth parameter of the delegate
worker.T5The type of the fifth parameter of the delegate
worker.
For<T1, T2, T3, T4, T5>(long, long, Action<long, 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
fromInclusivelongThe start index, inclusive.
toExclusivelongThe end index, exclusive.
workerAction<long, T1, T2, T3, T4, T5>The delegate that is invoked once per iteration.
arg1T1The first parameter of the delegate
worker.arg2T2The second parameter of the delegate
worker.arg3T3The third parameter of the delegate
worker.arg4T4The fourth parameter of the delegate
worker.arg5T5The fifth parameter of the delegate
worker.setupAction<AsyncTaskFactoryOptions>The AsyncTaskFactoryOptions which may be configured.
Type Parameters
T1The type of the first parameter of the delegate
worker.T2The type of the second parameter of the delegate
worker.T3The type of the third parameter of the delegate
worker.T4The type of the fourth parameter of the delegate
worker.T5The type of the fifth parameter of the delegate
worker.