Class AdvancedParallelFactory
Provides a factory based way to work with advanced scenarios that encapsulate and re-use existing code while adding support for typically long-running parallel loops and regions.
public static class AdvancedParallelFactory
  - Inheritance
 - 
      
      AdvancedParallelFactory
 
Methods
Condition<T>(T, RelationalOperator, T)
Provides a default implementation of a for-condition callback method.
public static bool Condition<T>(T current, RelationalOperator relational, T repeats) where T : struct, IComparable<T>, IEquatable<T>, IConvertible
  Parameters
currentTThe current value of the counter in a for-loop.
relationalRelationalOperatorOne of the enumeration values that specifies the rules to apply as the relational operator for left-hand operand
currentand right-hand operandrepeats.repeatsTThe amount of repeats to do according to the rules specified by
relational.
Returns
- bool
 trueifcurrentdoes not meet the condition ofrelationalandrepeats; otherwisefalse.
Type Parameters
TThe type of the counter in a for-loop.
ForAsync<TOperand>(ForLoopRuleset<TOperand>, Func<TOperand, CancellationToken, Task>, Action<AsyncWorkloadOptions>)
Executes a parallel for loop that offers control of the loop control variable and loop sections.
public static Task ForAsync<TOperand>(ForLoopRuleset<TOperand> rules, Func<TOperand, CancellationToken, Task> worker, Action<AsyncWorkloadOptions> setup = null) where TOperand : struct, IComparable<TOperand>, IEquatable<TOperand>, IConvertible
  Parameters
rulesForLoopRuleset<TOperand>The rules of a for-loop control flow statement.
workerFunc<TOperand, CancellationToken, Task>The Task based function delegate that is invoked once per iteration.
setupAction<AsyncWorkloadOptions>The AsyncWorkloadOptions which may be configured.
Returns
Type Parameters
TOperandThe type of the number used with the loop control variable.
Exceptions
- ArgumentNullException
 rulescannot be null -or-workercannot be null.
ForAsync<TOperand, T>(ForLoopRuleset<TOperand>, Func<TOperand, T, CancellationToken, Task>, T, Action<AsyncWorkloadOptions>)
Executes a parallel for loop that offers control of the loop control variable and loop sections.
public static Task ForAsync<TOperand, T>(ForLoopRuleset<TOperand> rules, Func<TOperand, T, CancellationToken, Task> worker, T arg, Action<AsyncWorkloadOptions> setup = null) where TOperand : struct, IComparable<TOperand>, IEquatable<TOperand>, IConvertible
  Parameters
rulesForLoopRuleset<TOperand>The rules of a for-loop control flow statement.
workerFunc<TOperand, T, CancellationToken, Task>The Task based function delegate that is invoked once per iteration.
argTThe parameter of the delegate
worker.setupAction<AsyncWorkloadOptions>The AsyncWorkloadOptions which may be configured.
Returns
Type Parameters
TOperandThe type of the number used with the loop control variable.
TThe type of the parameter of the delegate
worker.
Exceptions
- ArgumentNullException
 rulescannot be null -or-workercannot be null.
ForAsync<TOperand, T1, T2>(ForLoopRuleset<TOperand>, Func<TOperand, T1, T2, CancellationToken, Task>, T1, T2, Action<AsyncWorkloadOptions>)
Executes a parallel for loop that offers control of the loop control variable and loop sections.
public static Task ForAsync<TOperand, T1, T2>(ForLoopRuleset<TOperand> rules, Func<TOperand, T1, T2, CancellationToken, Task> worker, T1 arg1, T2 arg2, Action<AsyncWorkloadOptions> setup = null) where TOperand : struct, IComparable<TOperand>, IEquatable<TOperand>, IConvertible
  Parameters
rulesForLoopRuleset<TOperand>The rules of a for-loop control flow statement.
workerFunc<TOperand, T1, T2, CancellationToken, Task>The Task based function 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
TOperandThe type of the number used with the loop control variable.
T1The type of the first parameter of the delegate
worker.T2The type of the second parameter of the delegate
worker.
Exceptions
- ArgumentNullException
 rulescannot be null -or-workercannot be null.
ForAsync<TOperand, T1, T2, T3>(ForLoopRuleset<TOperand>, Func<TOperand, T1, T2, T3, CancellationToken, Task>, T1, T2, T3, Action<AsyncWorkloadOptions>)
Executes a parallel for loop that offers control of the loop control variable and loop sections.
public static Task ForAsync<TOperand, T1, T2, T3>(ForLoopRuleset<TOperand> rules, Func<TOperand, T1, T2, T3, CancellationToken, Task> worker, T1 arg1, T2 arg2, T3 arg3, Action<AsyncWorkloadOptions> setup = null) where TOperand : struct, IComparable<TOperand>, IEquatable<TOperand>, IConvertible
  Parameters
rulesForLoopRuleset<TOperand>The rules of a for-loop control flow statement.
workerFunc<TOperand, T1, T2, T3, CancellationToken, Task>The Task based function 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
TOperandThe type of the number used with the loop control variable.
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.
Exceptions
- ArgumentNullException
 rulescannot be null -or-workercannot be null.
ForAsync<TOperand, T1, T2, T3, T4>(ForLoopRuleset<TOperand>, Func<TOperand, T1, T2, T3, T4, CancellationToken, Task>, T1, T2, T3, T4, Action<AsyncWorkloadOptions>)
Executes a parallel for loop that offers control of the loop control variable and loop sections.
public static Task ForAsync<TOperand, T1, T2, T3, T4>(ForLoopRuleset<TOperand> rules, Func<TOperand, T1, T2, T3, T4, CancellationToken, Task> worker, T1 arg1, T2 arg2, T3 arg3, T4 arg4, Action<AsyncWorkloadOptions> setup = null) where TOperand : struct, IComparable<TOperand>, IEquatable<TOperand>, IConvertible
  Parameters
rulesForLoopRuleset<TOperand>The rules of a for-loop control flow statement.
workerFunc<TOperand, T1, T2, T3, T4, CancellationToken, Task>The Task based function 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
TOperandThe type of the number used with the loop control variable.
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.
Exceptions
- ArgumentNullException
 rulescannot be null -or-workercannot be null.
ForAsync<TOperand, T1, T2, T3, T4, T5>(ForLoopRuleset<TOperand>, Func<TOperand, T1, T2, T3, T4, T5, CancellationToken, Task>, T1, T2, T3, T4, T5, Action<AsyncWorkloadOptions>)
Executes a parallel for loop that offers control of the loop control variable and loop sections.
public static Task ForAsync<TOperand, T1, T2, T3, T4, T5>(ForLoopRuleset<TOperand> rules, Func<TOperand, T1, T2, T3, T4, T5, CancellationToken, Task> worker, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, Action<AsyncWorkloadOptions> setup = null) where TOperand : struct, IComparable<TOperand>, IEquatable<TOperand>, IConvertible
  Parameters
rulesForLoopRuleset<TOperand>The rules of a for-loop control flow statement.
workerFunc<TOperand, T1, T2, T3, T4, T5, CancellationToken, Task>The Task based function 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
TOperandThe type of the number used with the loop control variable.
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.
Exceptions
- ArgumentNullException
 rulescannot be null -or-workercannot be null.
ForResultAsync<TOperand, TResult>(ForLoopRuleset<TOperand>, Func<TOperand, CancellationToken, Task<TResult>>, Action<AsyncWorkloadOptions>)
Executes a parallel for loop that offers control of the loop control variable and loop sections 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<TOperand, TResult>(ForLoopRuleset<TOperand> rules, Func<TOperand, CancellationToken, Task<TResult>> worker, Action<AsyncWorkloadOptions> setup = null) where TOperand : struct, IComparable<TOperand>, IEquatable<TOperand>, IConvertible
  Parameters
rulesForLoopRuleset<TOperand>The rules of a for-loop control flow statement.
workerFunc<TOperand, 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
TOperandThe type of the number used with the loop control variable.
TResultThe type of the return value of the function delegate
worker.
Exceptions
- ArgumentNullException
 rulescannot be null -or-workercannot be null.
ForResultAsync<TOperand, T, TResult>(ForLoopRuleset<TOperand>, Func<TOperand, T, CancellationToken, Task<TResult>>, T, Action<AsyncWorkloadOptions>)
Executes a parallel for loop that offers control of the loop control variable and loop sections 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<TOperand, T, TResult>(ForLoopRuleset<TOperand> rules, Func<TOperand, T, CancellationToken, Task<TResult>> worker, T arg, Action<AsyncWorkloadOptions> setup = null) where TOperand : struct, IComparable<TOperand>, IEquatable<TOperand>, IConvertible
  Parameters
rulesForLoopRuleset<TOperand>The rules of a for-loop control flow statement.
workerFunc<TOperand, 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
TOperandThe type of the number used with the loop control variable.
TThe type of the parameter of the function delegate
worker.TResultThe type of the return value of the function delegate
worker.
Exceptions
- ArgumentNullException
 rulescannot be null -or-workercannot be null.
ForResultAsync<TOperand, T1, T2, TResult>(ForLoopRuleset<TOperand>, Func<TOperand, T1, T2, CancellationToken, Task<TResult>>, T1, T2, Action<AsyncWorkloadOptions>)
Executes a parallel for loop that offers control of the loop control variable and loop sections 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<TOperand, T1, T2, TResult>(ForLoopRuleset<TOperand> rules, Func<TOperand, T1, T2, CancellationToken, Task<TResult>> worker, T1 arg1, T2 arg2, Action<AsyncWorkloadOptions> setup = null) where TOperand : struct, IComparable<TOperand>, IEquatable<TOperand>, IConvertible
  Parameters
rulesForLoopRuleset<TOperand>The rules of a for-loop control flow statement.
workerFunc<TOperand, 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
TOperandThe type of the number used with the loop control variable.
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.
Exceptions
- ArgumentNullException
 rulescannot be null -or-workercannot be null.
ForResultAsync<TOperand, T1, T2, T3, TResult>(ForLoopRuleset<TOperand>, Func<TOperand, T1, T2, T3, CancellationToken, Task<TResult>>, T1, T2, T3, Action<AsyncWorkloadOptions>)
Executes a parallel for loop that offers control of the loop control variable and loop sections 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<TOperand, T1, T2, T3, TResult>(ForLoopRuleset<TOperand> rules, Func<TOperand, T1, T2, T3, CancellationToken, Task<TResult>> worker, T1 arg1, T2 arg2, T3 arg3, Action<AsyncWorkloadOptions> setup = null) where TOperand : struct, IComparable<TOperand>, IEquatable<TOperand>, IConvertible
  Parameters
rulesForLoopRuleset<TOperand>The rules of a for-loop control flow statement.
workerFunc<TOperand, 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
TOperandThe type of the number used with the loop control variable.
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.
Exceptions
- ArgumentNullException
 rulescannot be null -or-workercannot be null.
ForResultAsync<TOperand, T1, T2, T3, T4, TResult>(ForLoopRuleset<TOperand>, Func<TOperand, T1, T2, T3, T4, CancellationToken, Task<TResult>>, T1, T2, T3, T4, Action<AsyncWorkloadOptions>)
Executes a parallel for loop that offers control of the loop control variable and loop sections 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<TOperand, T1, T2, T3, T4, TResult>(ForLoopRuleset<TOperand> rules, Func<TOperand, T1, T2, T3, T4, CancellationToken, Task<TResult>> worker, T1 arg1, T2 arg2, T3 arg3, T4 arg4, Action<AsyncWorkloadOptions> setup = null) where TOperand : struct, IComparable<TOperand>, IEquatable<TOperand>, IConvertible
  Parameters
rulesForLoopRuleset<TOperand>The rules of a for-loop control flow statement.
workerFunc<TOperand, 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
TOperandThe type of the number used with the loop control variable.
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.
Exceptions
- ArgumentNullException
 rulescannot be null -or-workercannot be null.
ForResultAsync<TOperand, T1, T2, T3, T4, T5, TResult>(ForLoopRuleset<TOperand>, Func<TOperand, T1, T2, T3, T4, T5, CancellationToken, Task<TResult>>, T1, T2, T3, T4, T5, Action<AsyncWorkloadOptions>)
Executes a parallel for loop that offers control of the loop control variable and loop sections 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<TOperand, T1, T2, T3, T4, T5, TResult>(ForLoopRuleset<TOperand> rules, Func<TOperand, T1, T2, T3, T4, T5, CancellationToken, Task<TResult>> worker, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, Action<AsyncWorkloadOptions> setup = null) where TOperand : struct, IComparable<TOperand>, IEquatable<TOperand>, IConvertible
  Parameters
rulesForLoopRuleset<TOperand>The rules of a for-loop control flow statement.
workerFunc<TOperand, 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
TOperandThe type of the number used with the loop control variable.
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.
Exceptions
- ArgumentNullException
 rulescannot be null -or-workercannot be null.
ForResult<TOperand, TResult>(ForLoopRuleset<TOperand>, Func<TOperand, TResult>, Action<AsyncTaskFactoryOptions>)
Executes a parallel for loop that offers control of the loop control variable and loop sections 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<TOperand, TResult>(ForLoopRuleset<TOperand> rules, Func<TOperand, TResult> worker, Action<AsyncTaskFactoryOptions> setup = null) where TOperand : struct, IComparable<TOperand>, IEquatable<TOperand>, IConvertible
  Parameters
rulesForLoopRuleset<TOperand>The rules of a for-loop control flow statement.
workerFunc<TOperand, 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 as the for loop.
Type Parameters
TOperandThe type of the number used with the loop control variable.
TResultThe type of the return value of the function delegate
worker.
Exceptions
- ArgumentNullException
 rulescannot be null -or-workercannot be null.
ForResult<TOperand, T, TResult>(ForLoopRuleset<TOperand>, Func<TOperand, T, TResult>, T, Action<AsyncTaskFactoryOptions>)
Executes a parallel for loop that offers control of the loop control variable and loop sections 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<TOperand, T, TResult>(ForLoopRuleset<TOperand> rules, Func<TOperand, T, TResult> worker, T arg, Action<AsyncTaskFactoryOptions> setup = null) where TOperand : struct, IComparable<TOperand>, IEquatable<TOperand>, IConvertible
  Parameters
rulesForLoopRuleset<TOperand>The rules of a for-loop control flow statement.
workerFunc<TOperand, 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>
 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
TOperandThe type of the number used with the loop control variable.
TThe type of the parameter of the function delegate
worker.TResultThe type of the return value of the function delegate
worker.
Exceptions
- ArgumentNullException
 rulescannot be null -or-workercannot be null.
ForResult<TOperand, T1, T2, TResult>(ForLoopRuleset<TOperand>, Func<TOperand, T1, T2, TResult>, T1, T2, Action<AsyncTaskFactoryOptions>)
Executes a parallel for loop that offers control of the loop control variable and loop sections 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<TOperand, T1, T2, TResult>(ForLoopRuleset<TOperand> rules, Func<TOperand, T1, T2, TResult> worker, T1 arg1, T2 arg2, Action<AsyncTaskFactoryOptions> setup = null) where TOperand : struct, IComparable<TOperand>, IEquatable<TOperand>, IConvertible
  Parameters
rulesForLoopRuleset<TOperand>The rules of a for-loop control flow statement.
workerFunc<TOperand, 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>
 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
TOperandThe type of the number used with the loop control variable.
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.
Exceptions
- ArgumentNullException
 rulescannot be null -or-workercannot be null.
ForResult<TOperand, T1, T2, T3, TResult>(ForLoopRuleset<TOperand>, Func<TOperand, T1, T2, T3, TResult>, T1, T2, T3, Action<AsyncTaskFactoryOptions>)
Executes a parallel for loop that offers control of the loop control variable and loop sections 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<TOperand, T1, T2, T3, TResult>(ForLoopRuleset<TOperand> rules, Func<TOperand, T1, T2, T3, TResult> worker, T1 arg1, T2 arg2, T3 arg3, Action<AsyncTaskFactoryOptions> setup = null) where TOperand : struct, IComparable<TOperand>, IEquatable<TOperand>, IConvertible
  Parameters
rulesForLoopRuleset<TOperand>The rules of a for-loop control flow statement.
workerFunc<TOperand, 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>
 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
TOperandThe type of the number used with the loop control variable.
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.
Exceptions
- ArgumentNullException
 rulescannot be null -or-workercannot be null.
ForResult<TOperand, T1, T2, T3, T4, TResult>(ForLoopRuleset<TOperand>, Func<TOperand, T1, T2, T3, T4, TResult>, T1, T2, T3, T4, Action<AsyncTaskFactoryOptions>)
Executes a parallel for loop that offers control of the loop control variable and loop sections 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<TOperand, T1, T2, T3, T4, TResult>(ForLoopRuleset<TOperand> rules, Func<TOperand, T1, T2, T3, T4, TResult> worker, T1 arg1, T2 arg2, T3 arg3, T4 arg4, Action<AsyncTaskFactoryOptions> setup = null) where TOperand : struct, IComparable<TOperand>, IEquatable<TOperand>, IConvertible
  Parameters
rulesForLoopRuleset<TOperand>The rules of a for-loop control flow statement.
workerFunc<TOperand, 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>
 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
TOperandThe type of the number used with the loop control variable.
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.
Exceptions
- ArgumentNullException
 rulescannot be null -or-workercannot be null.
ForResult<TOperand, T1, T2, T3, T4, T5, TResult>(ForLoopRuleset<TOperand>, Func<TOperand, T1, T2, T3, T4, T5, TResult>, T1, T2, T3, T4, T5, Action<AsyncTaskFactoryOptions>)
Executes a parallel for loop that offers control of the loop control variable and loop sections 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<TOperand, T1, T2, T3, T4, T5, TResult>(ForLoopRuleset<TOperand> rules, Func<TOperand, T1, T2, T3, T4, T5, TResult> worker, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, Action<AsyncTaskFactoryOptions> setup = null) where TOperand : struct, IComparable<TOperand>, IEquatable<TOperand>, IConvertible
  Parameters
rulesForLoopRuleset<TOperand>The rules of a for-loop control flow statement.
workerFunc<TOperand, 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>
 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
TOperandThe type of the number used with the loop control variable.
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.
Exceptions
- ArgumentNullException
 rulescannot be null -or-workercannot be null.
For<TOperand>(ForLoopRuleset<TOperand>, Action<TOperand>, Action<AsyncTaskFactoryOptions>)
Executes a parallel for loop that offers control of the loop control variable and loop sections.
public static void For<TOperand>(ForLoopRuleset<TOperand> rules, Action<TOperand> worker, Action<AsyncTaskFactoryOptions> setup = null) where TOperand : struct, IComparable<TOperand>, IEquatable<TOperand>, IConvertible
  Parameters
rulesForLoopRuleset<TOperand>The rules of a for-loop control flow statement.
workerAction<TOperand>The delegate that is invoked once per iteration.
setupAction<AsyncTaskFactoryOptions>The AsyncTaskFactoryOptions which may be configured.
Type Parameters
TOperandThe type of the number used with the loop control variable.
Exceptions
- ArgumentNullException
 rulescannot be null -or-workercannot be null.
For<TOperand, T>(ForLoopRuleset<TOperand>, Action<TOperand, T>, T, Action<AsyncTaskFactoryOptions>)
Executes a parallel for loop that offers control of the loop control variable and loop sections.
public static void For<TOperand, T>(ForLoopRuleset<TOperand> rules, Action<TOperand, T> worker, T arg, Action<AsyncTaskFactoryOptions> setup = null) where TOperand : struct, IComparable<TOperand>, IEquatable<TOperand>, IConvertible
  Parameters
rulesForLoopRuleset<TOperand>The rules of a for-loop control flow statement.
workerAction<TOperand, 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
TOperandThe type of the number used with the loop control variable.
TThe type of the parameter of the delegate
worker.
Exceptions
- ArgumentNullException
 rulescannot be null -or-workercannot be null.
For<TOperand, T1, T2>(ForLoopRuleset<TOperand>, Action<TOperand, T1, T2>, T1, T2, Action<AsyncTaskFactoryOptions>)
Executes a parallel for loop that offers control of the loop control variable and loop sections.
public static void For<TOperand, T1, T2>(ForLoopRuleset<TOperand> rules, Action<TOperand, T1, T2> worker, T1 arg1, T2 arg2, Action<AsyncTaskFactoryOptions> setup = null) where TOperand : struct, IComparable<TOperand>, IEquatable<TOperand>, IConvertible
  Parameters
rulesForLoopRuleset<TOperand>The rules of a for-loop control flow statement.
workerAction<TOperand, 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
TOperandThe type of the number used with the loop control variable.
T1The type of the first parameter of the delegate
worker.T2The type of the second parameter of the delegate
worker.
Exceptions
- ArgumentNullException
 rulescannot be null -or-workercannot be null.
For<TOperand, T1, T2, T3>(ForLoopRuleset<TOperand>, Action<TOperand, T1, T2, T3>, T1, T2, T3, Action<AsyncTaskFactoryOptions>)
Executes a parallel for loop that offers control of the loop control variable and loop sections.
public static void For<TOperand, T1, T2, T3>(ForLoopRuleset<TOperand> rules, Action<TOperand, T1, T2, T3> worker, T1 arg1, T2 arg2, T3 arg3, Action<AsyncTaskFactoryOptions> setup = null) where TOperand : struct, IComparable<TOperand>, IEquatable<TOperand>, IConvertible
  Parameters
rulesForLoopRuleset<TOperand>The rules of a for-loop control flow statement.
workerAction<TOperand, 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
TOperandThe type of the number used with the loop control variable.
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.
Exceptions
- ArgumentNullException
 rulescannot be null -or-workercannot be null.
For<TOperand, T1, T2, T3, T4>(ForLoopRuleset<TOperand>, Action<TOperand, T1, T2, T3, T4>, T1, T2, T3, T4, Action<AsyncTaskFactoryOptions>)
Executes a parallel for loop that offers control of the loop control variable and loop sections.
public static void For<TOperand, T1, T2, T3, T4>(ForLoopRuleset<TOperand> rules, Action<TOperand, T1, T2, T3, T4> worker, T1 arg1, T2 arg2, T3 arg3, T4 arg4, Action<AsyncTaskFactoryOptions> setup = null) where TOperand : struct, IComparable<TOperand>, IEquatable<TOperand>, IConvertible
  Parameters
rulesForLoopRuleset<TOperand>The rules of a for-loop control flow statement.
workerAction<TOperand, 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
TOperandThe type of the number used with the loop control variable.
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.
Exceptions
- ArgumentNullException
 rulescannot be null -or-workercannot be null.
For<TOperand, T1, T2, T3, T4, T5>(ForLoopRuleset<TOperand>, Action<TOperand, T1, T2, T3, T4, T5>, T1, T2, T3, T4, T5, Action<AsyncTaskFactoryOptions>)
Executes a parallel for loop that offers control of the loop control variable and loop sections.
public static void For<TOperand, T1, T2, T3, T4, T5>(ForLoopRuleset<TOperand> rules, Action<TOperand, T1, T2, T3, T4, T5> worker, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, Action<AsyncTaskFactoryOptions> setup = null) where TOperand : struct, IComparable<TOperand>, IEquatable<TOperand>, IConvertible
  Parameters
rulesForLoopRuleset<TOperand>The rules of a for-loop control flow statement.
workerAction<TOperand, 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
TOperandThe type of the number used with the loop control variable.
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.
Exceptions
- ArgumentNullException
 rulescannot be null -or-workercannot be null.
Iterator<T>(T, AssignmentOperator, T)
Provides a default implementation of a for-iterator callback method.
public static T Iterator<T>(T current, AssignmentOperator assignment, T step) where T : struct, IComparable<T>, IEquatable<T>, IConvertible
  Parameters
currentTThe current value of the counter in a for-loop.
assignmentAssignmentOperatorOne of the enumeration values that specifies the rules to apply as the assignment operator for left-hand operand
currentand right-hand operandstep.stepTThe value to assign to
currentaccording to the rule specified byassignment.
Returns
- T
 The computed result of
currenthaving theassignmentofstep.
Type Parameters
TThe type of the counter in a for-loop.
WhileAsync<TReader, TElement>(TReader, Func<Task<bool>>, Func<TReader, TElement>, Func<TElement, CancellationToken, Task>, Action<AsyncWorkloadOptions>)
Executes a parallel while loop.
public static Task WhileAsync<TReader, TElement>(TReader reader, Func<Task<bool>> condition, Func<TReader, TElement> provider, Func<TElement, CancellationToken, Task> worker, Action<AsyncWorkloadOptions> setup = null)
  Parameters
readerTReaderThe reader that provides forward-only access to data.
conditionFunc<Task<bool>>The function delegate that is responsible for the while loop condition.
providerFunc<TReader, TElement>The function delegate that provides data from the specified
reader.workerFunc<TElement, CancellationToken, Task>The delegate that will perform work while
conditionevaluatestrue.setupAction<AsyncWorkloadOptions>The AsyncWorkloadOptions which may be configured.
Returns
Type Parameters
TReaderThe type of the
readerthat provides forward-only access to data.TElementThe type of the result provided by
reader.
WhileAsync<TReader, TElement, T>(TReader, Func<Task<bool>>, Func<TReader, TElement>, Func<TElement, T, CancellationToken, Task>, T, Action<AsyncWorkloadOptions>)
Executes a parallel while loop.
public static Task WhileAsync<TReader, TElement, T>(TReader reader, Func<Task<bool>> condition, Func<TReader, TElement> provider, Func<TElement, T, CancellationToken, Task> worker, T arg, Action<AsyncWorkloadOptions> setup = null)
  Parameters
readerTReaderThe reader that provides forward-only access to data.
conditionFunc<Task<bool>>The function delegate that is responsible for the while loop condition.
providerFunc<TReader, TElement>The function delegate that provides data from the specified
reader.workerFunc<TElement, T, CancellationToken, Task>The delegate that will perform work while
conditionevaluatestrue.argTThe parameter of the delegate
worker.setupAction<AsyncWorkloadOptions>The AsyncWorkloadOptions which may be configured.
Returns
Type Parameters
TReaderThe type of the
readerthat provides forward-only access to data.TElementThe type of the result provided by
reader.TThe type of the parameter of the delegate
worker.
WhileAsync<TReader, TElement, T1, T2>(TReader, Func<Task<bool>>, Func<TReader, TElement>, Func<TElement, T1, T2, CancellationToken, Task>, T1, T2, Action<AsyncWorkloadOptions>)
Executes a parallel while loop.
public static Task WhileAsync<TReader, TElement, T1, T2>(TReader reader, Func<Task<bool>> condition, Func<TReader, TElement> provider, Func<TElement, T1, T2, CancellationToken, Task> worker, T1 arg1, T2 arg2, Action<AsyncWorkloadOptions> setup = null)
  Parameters
readerTReaderThe reader that provides forward-only access to data.
conditionFunc<Task<bool>>The function delegate that is responsible for the while loop condition.
providerFunc<TReader, TElement>The function delegate that provides data from the specified
reader.workerFunc<TElement, T1, T2, CancellationToken, Task>The delegate that will perform work while
conditionevaluatestrue.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
TReaderThe type of the
readerthat provides forward-only access to data.TElementThe type of the result provided by
reader.T1The type of the first parameter of the delegate
worker.T2The type of the second parameter of the delegate
worker.
WhileAsync<TReader, TElement, T1, T2, T3>(TReader, Func<Task<bool>>, Func<TReader, TElement>, Func<TElement, T1, T2, T3, CancellationToken, Task>, T1, T2, T3, Action<AsyncWorkloadOptions>)
Executes a parallel while loop.
public static Task WhileAsync<TReader, TElement, T1, T2, T3>(TReader reader, Func<Task<bool>> condition, Func<TReader, TElement> provider, Func<TElement, T1, T2, T3, CancellationToken, Task> worker, T1 arg1, T2 arg2, T3 arg3, Action<AsyncWorkloadOptions> setup = null)
  Parameters
readerTReaderThe reader that provides forward-only access to data.
conditionFunc<Task<bool>>The function delegate that is responsible for the while loop condition.
providerFunc<TReader, TElement>The function delegate that provides data from the specified
reader.workerFunc<TElement, T1, T2, T3, CancellationToken, Task>The delegate that will perform work while
conditionevaluatestrue.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
TReaderThe type of the
readerthat provides forward-only access to data.TElementThe type of the result provided by
reader.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.
WhileAsync<TReader, TElement, T1, T2, T3, T4>(TReader, Func<Task<bool>>, Func<TReader, TElement>, Func<TElement, T1, T2, T3, T4, CancellationToken, Task>, T1, T2, T3, T4, Action<AsyncWorkloadOptions>)
Executes a parallel while loop.
public static Task WhileAsync<TReader, TElement, T1, T2, T3, T4>(TReader reader, Func<Task<bool>> condition, Func<TReader, TElement> provider, Func<TElement, T1, T2, T3, T4, CancellationToken, Task> worker, T1 arg1, T2 arg2, T3 arg3, T4 arg4, Action<AsyncWorkloadOptions> setup = null)
  Parameters
readerTReaderThe reader that provides forward-only access to data.
conditionFunc<Task<bool>>The function delegate that is responsible for the while loop condition.
providerFunc<TReader, TElement>The function delegate that provides data from the specified
reader.workerFunc<TElement, T1, T2, T3, T4, CancellationToken, Task>The delegate that will perform work while
conditionevaluatestrue.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
TReaderThe type of the
readerthat provides forward-only access to data.TElementThe type of the result provided by
reader.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.
WhileAsync<TReader, TElement, T1, T2, T3, T4, T5>(TReader, Func<Task<bool>>, Func<TReader, TElement>, Func<TElement, T1, T2, T3, T4, T5, CancellationToken, Task>, T1, T2, T3, T4, T5, Action<AsyncWorkloadOptions>)
Executes a parallel while loop.
public static Task WhileAsync<TReader, TElement, T1, T2, T3, T4, T5>(TReader reader, Func<Task<bool>> condition, Func<TReader, TElement> provider, Func<TElement, T1, T2, T3, T4, T5, CancellationToken, Task> worker, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, Action<AsyncWorkloadOptions> setup = null)
  Parameters
readerTReaderThe reader that provides forward-only access to data.
conditionFunc<Task<bool>>The function delegate that is responsible for the while loop condition.
providerFunc<TReader, TElement>The function delegate that provides data from the specified
reader.workerFunc<TElement, T1, T2, T3, T4, T5, CancellationToken, Task>The delegate that will perform work while
conditionevaluatestrue.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
TReaderThe type of the
readerthat provides forward-only access to data.TElementThe type of the result provided by
reader.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.
WhileResultAsync<TReader, TElement, TResult>(TReader, Func<Task<bool>>, Func<TReader, TElement>, Func<TElement, CancellationToken, Task<TResult>>, Action<AsyncWorkloadOptions>)
Executes a parallel while loop where the return value of the function delegate worker is stored in the same order as the while loop evaluates true.
public static Task<IReadOnlyCollection<TResult>> WhileResultAsync<TReader, TElement, TResult>(TReader reader, Func<Task<bool>> condition, Func<TReader, TElement> provider, Func<TElement, CancellationToken, Task<TResult>> worker, Action<AsyncWorkloadOptions> setup = null)
  Parameters
readerTReaderThe reader that provides forward-only access to data.
conditionFunc<Task<bool>>The function delegate that is responsible for the while loop condition.
providerFunc<TReader, TElement>The function delegate that provides data from the specified
reader.workerFunc<TElement, CancellationToken, Task<TResult>>The delegate that will perform work while
conditionevaluatestrue.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 order as the while loop evaluatestrue.
Type Parameters
TReaderThe type of the
readerthat provides forward-only access to data.TElementThe type of the result provided by
reader.TResultThe type of the return value of the function delegate
worker.
WhileResultAsync<TReader, TElement, T, TResult>(TReader, Func<Task<bool>>, Func<TReader, TElement>, Func<TElement, T, CancellationToken, Task<TResult>>, T, Action<AsyncWorkloadOptions>)
Executes a parallel while loop where the return value of the function delegate worker is stored in the same order as the while loop evaluates true.
public static Task<IReadOnlyCollection<TResult>> WhileResultAsync<TReader, TElement, T, TResult>(TReader reader, Func<Task<bool>> condition, Func<TReader, TElement> provider, Func<TElement, T, CancellationToken, Task<TResult>> worker, T arg, Action<AsyncWorkloadOptions> setup = null)
  Parameters
readerTReaderThe reader that provides forward-only access to data.
conditionFunc<Task<bool>>The function delegate that is responsible for the while loop condition.
providerFunc<TReader, TElement>The function delegate that provides data from the specified
reader.workerFunc<TElement, T, CancellationToken, Task<TResult>>The delegate that will perform work while
conditionevaluatestrue.argTThe parameter of the 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 order as the while loop evaluatestrue.
Type Parameters
TReaderThe type of the
readerthat provides forward-only access to data.TElementThe type of the result provided by
reader.TThe type of the parameter of the delegate
worker.TResultThe type of the return value of the function delegate
worker.
WhileResultAsync<TReader, TElement, T1, T2, TResult>(TReader, Func<Task<bool>>, Func<TReader, TElement>, Func<TElement, T1, T2, CancellationToken, Task<TResult>>, T1, T2, Action<AsyncWorkloadOptions>)
Executes a parallel while loop where the return value of the function delegate worker is stored in the same order as the while loop evaluates true.
public static Task<IReadOnlyCollection<TResult>> WhileResultAsync<TReader, TElement, T1, T2, TResult>(TReader reader, Func<Task<bool>> condition, Func<TReader, TElement> provider, Func<TElement, T1, T2, CancellationToken, Task<TResult>> worker, T1 arg1, T2 arg2, Action<AsyncWorkloadOptions> setup = null)
  Parameters
readerTReaderThe reader that provides forward-only access to data.
conditionFunc<Task<bool>>The function delegate that is responsible for the while loop condition.
providerFunc<TReader, TElement>The function delegate that provides data from the specified
reader.workerFunc<TElement, T1, T2, CancellationToken, Task<TResult>>The delegate that will perform work while
conditionevaluatestrue.arg1T1The first parameter of the delegate
worker.arg2T2The second parameter of the 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 order as the while loop evaluatestrue.
Type Parameters
TReaderThe type of the
readerthat provides forward-only access to data.TElementThe type of the result provided by
reader.T1The type of the first parameter of the delegate
worker.T2The type of the second parameter of the delegate
worker.TResultThe type of the return value of the function delegate
worker.
WhileResultAsync<TReader, TElement, T1, T2, T3, TResult>(TReader, Func<Task<bool>>, Func<TReader, TElement>, Func<TElement, T1, T2, T3, CancellationToken, Task<TResult>>, T1, T2, T3, Action<AsyncWorkloadOptions>)
Executes a parallel while loop where the return value of the function delegate worker is stored in the same order as the while loop evaluates true.
public static Task<IReadOnlyCollection<TResult>> WhileResultAsync<TReader, TElement, T1, T2, T3, TResult>(TReader reader, Func<Task<bool>> condition, Func<TReader, TElement> provider, Func<TElement, T1, T2, T3, CancellationToken, Task<TResult>> worker, T1 arg1, T2 arg2, T3 arg3, Action<AsyncWorkloadOptions> setup = null)
  Parameters
readerTReaderThe reader that provides forward-only access to data.
conditionFunc<Task<bool>>The function delegate that is responsible for the while loop condition.
providerFunc<TReader, TElement>The function delegate that provides data from the specified
reader.workerFunc<TElement, T1, T2, T3, CancellationToken, Task<TResult>>The delegate that will perform work while
conditionevaluatestrue.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
- 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 order as the while loop evaluatestrue.
Type Parameters
TReaderThe type of the
readerthat provides forward-only access to data.TElementThe type of the result provided by
reader.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.TResultThe type of the return value of the function delegate
worker.
WhileResultAsync<TReader, TElement, T1, T2, T3, T4, TResult>(TReader, Func<Task<bool>>, Func<TReader, TElement>, Func<TElement, T1, T2, T3, T4, CancellationToken, Task<TResult>>, T1, T2, T3, T4, Action<AsyncWorkloadOptions>)
Executes a parallel while loop where the return value of the function delegate worker is stored in the same order as the while loop evaluates true.
public static Task<IReadOnlyCollection<TResult>> WhileResultAsync<TReader, TElement, T1, T2, T3, T4, TResult>(TReader reader, Func<Task<bool>> condition, Func<TReader, TElement> provider, Func<TElement, T1, T2, T3, T4, CancellationToken, Task<TResult>> worker, T1 arg1, T2 arg2, T3 arg3, T4 arg4, Action<AsyncWorkloadOptions> setup = null)
  Parameters
readerTReaderThe reader that provides forward-only access to data.
conditionFunc<Task<bool>>The function delegate that is responsible for the while loop condition.
providerFunc<TReader, TElement>The function delegate that provides data from the specified
reader.workerFunc<TElement, T1, T2, T3, T4, CancellationToken, Task<TResult>>The delegate that will perform work while
conditionevaluatestrue.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
- 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 order as the while loop evaluatestrue.
Type Parameters
TReaderThe type of the
readerthat provides forward-only access to data.TElementThe type of the result provided by
reader.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.TResultThe type of the return value of the function delegate
worker.
WhileResultAsync<TReader, TElement, T1, T2, T3, T4, T5, TResult>(TReader, Func<Task<bool>>, Func<TReader, TElement>, Func<TElement, T1, T2, T3, T4, T5, CancellationToken, Task<TResult>>, T1, T2, T3, T4, T5, Action<AsyncWorkloadOptions>)
Executes a parallel while loop where the return value of the function delegate worker is stored in the same order as the while loop evaluates true.
public static Task<IReadOnlyCollection<TResult>> WhileResultAsync<TReader, TElement, T1, T2, T3, T4, T5, TResult>(TReader reader, Func<Task<bool>> condition, Func<TReader, TElement> provider, Func<TElement, T1, T2, T3, T4, T5, CancellationToken, Task<TResult>> worker, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, Action<AsyncWorkloadOptions> setup = null)
  Parameters
readerTReaderThe reader that provides forward-only access to data.
conditionFunc<Task<bool>>The function delegate that is responsible for the while loop condition.
providerFunc<TReader, TElement>The function delegate that provides data from the specified
reader.workerFunc<TElement, T1, T2, T3, T4, T5, CancellationToken, Task<TResult>>The delegate that will perform work while
conditionevaluatestrue.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
- 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 order as the while loop evaluatestrue.
Type Parameters
TReaderThe type of the
readerthat provides forward-only access to data.TElementThe type of the result provided by
reader.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.TResultThe type of the return value of the function delegate
worker.
WhileResult<TReader, TElement, TResult>(TReader, Func<bool>, Func<TReader, TElement>, Func<TElement, TResult>, Action<AsyncTaskFactoryOptions>)
Executes a parallel while loop where the return value of the function delegate worker is stored in the same order as the while loop evaluates true.
public static IReadOnlyCollection<TResult> WhileResult<TReader, TElement, TResult>(TReader reader, Func<bool> condition, Func<TReader, TElement> provider, Func<TElement, TResult> worker, Action<AsyncTaskFactoryOptions> setup = null)
  Parameters
readerTReaderThe reader that provides forward-only access to data.
conditionFunc<bool>The function delegate that is responsible for the while loop condition.
providerFunc<TReader, TElement>The function delegate that provides data from the specified
reader.workerFunc<TElement, TResult>The delegate that will perform work while
conditionevaluatestrue.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 order as the while loop evaluatestrue.
Type Parameters
TReaderThe type of the
readerthat provides forward-only access to data.TElementThe type of the result provided by
reader.TResultThe type of the return value of the function delegate
worker.
WhileResult<TReader, TElement, T, TResult>(TReader, Func<bool>, Func<TReader, TElement>, Func<TElement, T, TResult>, T, Action<AsyncTaskFactoryOptions>)
Executes a parallel while loop where the return value of the function delegate worker is stored in the same order as the while loop evaluates true.
public static IReadOnlyCollection<TResult> WhileResult<TReader, TElement, T, TResult>(TReader reader, Func<bool> condition, Func<TReader, TElement> provider, Func<TElement, T, TResult> worker, T arg, Action<AsyncTaskFactoryOptions> setup = null)
  Parameters
readerTReaderThe reader that provides forward-only access to data.
conditionFunc<bool>The function delegate that is responsible for the while loop condition.
providerFunc<TReader, TElement>The function delegate that provides data from the specified
reader.workerFunc<TElement, T, TResult>The delegate that will perform work while
conditionevaluatestrue.argTThe parameter of the 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 order as the while loop evaluatestrue.
Type Parameters
TReaderThe type of the
readerthat provides forward-only access to data.TElementThe type of the result provided by
reader.TThe type of the parameter of the delegate
worker.TResultThe type of the return value of the function delegate
worker.
WhileResult<TReader, TElement, T1, T2, TResult>(TReader, Func<bool>, Func<TReader, TElement>, Func<TElement, T1, T2, TResult>, T1, T2, Action<AsyncTaskFactoryOptions>)
Executes a parallel while loop where the return value of the function delegate worker is stored in the same order as the while loop evaluates true.
public static IReadOnlyCollection<TResult> WhileResult<TReader, TElement, T1, T2, TResult>(TReader reader, Func<bool> condition, Func<TReader, TElement> provider, Func<TElement, T1, T2, TResult> worker, T1 arg1, T2 arg2, Action<AsyncTaskFactoryOptions> setup = null)
  Parameters
readerTReaderThe reader that provides forward-only access to data.
conditionFunc<bool>The function delegate that is responsible for the while loop condition.
providerFunc<TReader, TElement>The function delegate that provides data from the specified
reader.workerFunc<TElement, T1, T2, TResult>The delegate that will perform work while
conditionevaluatestrue.arg1T1The first parameter of the delegate
worker.arg2T2The second parameter of the 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 order as the while loop evaluatestrue.
Type Parameters
TReaderThe type of the
readerthat provides forward-only access to data.TElementThe type of the result provided by
reader.T1The type of the first parameter of the delegate
worker.T2The type of the second parameter of the delegate
worker.TResultThe type of the return value of the function delegate
worker.
WhileResult<TReader, TElement, T1, T2, T3, TResult>(TReader, Func<bool>, Func<TReader, TElement>, Func<TElement, T1, T2, T3, TResult>, T1, T2, T3, Action<AsyncTaskFactoryOptions>)
Executes a parallel while loop where the return value of the function delegate worker is stored in the same order as the while loop evaluates true.
public static IReadOnlyCollection<TResult> WhileResult<TReader, TElement, T1, T2, T3, TResult>(TReader reader, Func<bool> condition, Func<TReader, TElement> provider, Func<TElement, T1, T2, T3, TResult> worker, T1 arg1, T2 arg2, T3 arg3, Action<AsyncTaskFactoryOptions> setup = null)
  Parameters
readerTReaderThe reader that provides forward-only access to data.
conditionFunc<bool>The function delegate that is responsible for the while loop condition.
providerFunc<TReader, TElement>The function delegate that provides data from the specified
reader.workerFunc<TElement, T1, T2, T3, TResult>The delegate that will perform work while
conditionevaluatestrue.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.
Returns
- IReadOnlyCollection<TResult>
 An IReadOnlyCollection<T> where the return value of the function delegate
workeris stored in the same order as the while loop evaluatestrue.
Type Parameters
TReaderThe type of the
readerthat provides forward-only access to data.TElementThe type of the result provided by
reader.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.TResultThe type of the return value of the function delegate
worker.
WhileResult<TReader, TElement, T1, T2, T3, T4, TResult>(TReader, Func<bool>, Func<TReader, TElement>, Func<TElement, T1, T2, T3, T4, TResult>, T1, T2, T3, T4, Action<AsyncTaskFactoryOptions>)
Executes a parallel while loop where the return value of the function delegate worker is stored in the same order as the while loop evaluates true.
public static IReadOnlyCollection<TResult> WhileResult<TReader, TElement, T1, T2, T3, T4, TResult>(TReader reader, Func<bool> condition, Func<TReader, TElement> provider, Func<TElement, T1, T2, T3, T4, TResult> worker, T1 arg1, T2 arg2, T3 arg3, T4 arg4, Action<AsyncTaskFactoryOptions> setup = null)
  Parameters
readerTReaderThe reader that provides forward-only access to data.
conditionFunc<bool>The function delegate that is responsible for the while loop condition.
providerFunc<TReader, TElement>The function delegate that provides data from the specified
reader.workerFunc<TElement, T1, T2, T3, T4, TResult>The delegate that will perform work while
conditionevaluatestrue.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.
Returns
- IReadOnlyCollection<TResult>
 An IReadOnlyCollection<T> where the return value of the function delegate
workeris stored in the same order as the while loop evaluatestrue.
Type Parameters
TReaderThe type of the
readerthat provides forward-only access to data.TElementThe type of the result provided by
reader.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.TResultThe type of the return value of the function delegate
worker.
WhileResult<TReader, TElement, T1, T2, T3, T4, T5, TResult>(TReader, Func<bool>, Func<TReader, TElement>, Func<TElement, T1, T2, T3, T4, T5, TResult>, T1, T2, T3, T4, T5, Action<AsyncTaskFactoryOptions>)
Executes a parallel while loop where the return value of the function delegate worker is stored in the same order as the while loop evaluates true.
public static IReadOnlyCollection<TResult> WhileResult<TReader, TElement, T1, T2, T3, T4, T5, TResult>(TReader reader, Func<bool> condition, Func<TReader, TElement> provider, Func<TElement, T1, T2, T3, T4, T5, TResult> worker, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, Action<AsyncTaskFactoryOptions> setup = null)
  Parameters
readerTReaderThe reader that provides forward-only access to data.
conditionFunc<bool>The function delegate that is responsible for the while loop condition.
providerFunc<TReader, TElement>The function delegate that provides data from the specified
reader.workerFunc<TElement, T1, T2, T3, T4, T5, TResult>The delegate that will perform work while
conditionevaluatestrue.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.
Returns
- IReadOnlyCollection<TResult>
 An IReadOnlyCollection<T> where the return value of the function delegate
workeris stored in the same order as the while loop evaluatestrue.
Type Parameters
TReaderThe type of the
readerthat provides forward-only access to data.TElementThe type of the result provided by
reader.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.TResultThe type of the return value of the function delegate
worker.
While<TReader, TElement>(TReader, Func<bool>, Func<TReader, TElement>, Action<TElement>, Action<AsyncTaskFactoryOptions>)
Executes a parallel while loop.
public static void While<TReader, TElement>(TReader reader, Func<bool> condition, Func<TReader, TElement> provider, Action<TElement> worker, Action<AsyncTaskFactoryOptions> setup = null)
  Parameters
readerTReaderThe reader that provides forward-only access to data.
conditionFunc<bool>The function delegate that is responsible for the while loop condition.
providerFunc<TReader, TElement>The function delegate that provides data from the specified
reader.workerAction<TElement>The delegate that will perform work while
conditionevaluatestrue.setupAction<AsyncTaskFactoryOptions>The AsyncTaskFactoryOptions which may be configured.
Type Parameters
TReaderThe type of the
readerthat provides forward-only access to data.TElementThe type of the result provided by
reader.
While<TReader, TElement, T>(TReader, Func<bool>, Func<TReader, TElement>, Action<TElement, T>, T, Action<AsyncTaskFactoryOptions>)
Executes a parallel while loop.
public static void While<TReader, TElement, T>(TReader reader, Func<bool> condition, Func<TReader, TElement> provider, Action<TElement, T> worker, T arg, Action<AsyncTaskFactoryOptions> setup = null)
  Parameters
readerTReaderThe reader that provides forward-only access to data.
conditionFunc<bool>The function delegate that is responsible for the while loop condition.
providerFunc<TReader, TElement>The function delegate that provides data from the specified
reader.workerAction<TElement, T>The delegate that will perform work while
conditionevaluatestrue.argTThe parameter of the delegate
worker.setupAction<AsyncTaskFactoryOptions>The AsyncTaskFactoryOptions which may be configured.
Type Parameters
TReaderThe type of the
readerthat provides forward-only access to data.TElementThe type of the result provided by
reader.TThe type of the parameter of the delegate
worker.
While<TReader, TElement, T1, T2>(TReader, Func<bool>, Func<TReader, TElement>, Action<TElement, T1, T2>, T1, T2, Action<AsyncTaskFactoryOptions>)
Executes a parallel while loop.
public static void While<TReader, TElement, T1, T2>(TReader reader, Func<bool> condition, Func<TReader, TElement> provider, Action<TElement, T1, T2> worker, T1 arg1, T2 arg2, Action<AsyncTaskFactoryOptions> setup = null)
  Parameters
readerTReaderThe reader that provides forward-only access to data.
conditionFunc<bool>The function delegate that is responsible for the while loop condition.
providerFunc<TReader, TElement>The function delegate that provides data from the specified
reader.workerAction<TElement, T1, T2>The delegate that will perform work while
conditionevaluatestrue.arg1T1The first parameter of the delegate
worker.arg2T2The second parameter of the delegate
worker.setupAction<AsyncTaskFactoryOptions>The AsyncTaskFactoryOptions which may be configured.
Type Parameters
TReaderThe type of the
readerthat provides forward-only access to data.TElementThe type of the result provided by
reader.T1The type of the first parameter of the delegate
worker.T2The type of the second parameter of the delegate
worker.
While<TReader, TElement, T1, T2, T3>(TReader, Func<bool>, Func<TReader, TElement>, Action<TElement, T1, T2, T3>, T1, T2, T3, Action<AsyncTaskFactoryOptions>)
Executes a parallel while loop.
public static void While<TReader, TElement, T1, T2, T3>(TReader reader, Func<bool> condition, Func<TReader, TElement> provider, Action<TElement, T1, T2, T3> worker, T1 arg1, T2 arg2, T3 arg3, Action<AsyncTaskFactoryOptions> setup = null)
  Parameters
readerTReaderThe reader that provides forward-only access to data.
conditionFunc<bool>The function delegate that is responsible for the while loop condition.
providerFunc<TReader, TElement>The function delegate that provides data from the specified
reader.workerAction<TElement, T1, T2, T3>The delegate that will perform work while
conditionevaluatestrue.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
TReaderThe type of the
readerthat provides forward-only access to data.TElementThe type of the result provided by
reader.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.
While<TReader, TElement, T1, T2, T3, T4>(TReader, Func<bool>, Func<TReader, TElement>, Action<TElement, T1, T2, T3, T4>, T1, T2, T3, T4, Action<AsyncTaskFactoryOptions>)
Executes a parallel while loop.
public static void While<TReader, TElement, T1, T2, T3, T4>(TReader reader, Func<bool> condition, Func<TReader, TElement> provider, Action<TElement, T1, T2, T3, T4> worker, T1 arg1, T2 arg2, T3 arg3, T4 arg4, Action<AsyncTaskFactoryOptions> setup = null)
  Parameters
readerTReaderThe reader that provides forward-only access to data.
conditionFunc<bool>The function delegate that is responsible for the while loop condition.
providerFunc<TReader, TElement>The function delegate that provides data from the specified
reader.workerAction<TElement, T1, T2, T3, T4>The delegate that will perform work while
conditionevaluatestrue.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
TReaderThe type of the
readerthat provides forward-only access to data.TElementThe type of the result provided by
reader.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.
While<TReader, TElement, T1, T2, T3, T4, T5>(TReader, Func<bool>, Func<TReader, TElement>, Action<TElement, T1, T2, T3, T4, T5>, T1, T2, T3, T4, T5, Action<AsyncTaskFactoryOptions>)
Executes a parallel while loop.
public static void While<TReader, TElement, T1, T2, T3, T4, T5>(TReader reader, Func<bool> condition, Func<TReader, TElement> provider, Action<TElement, T1, T2, T3, T4, T5> worker, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, Action<AsyncTaskFactoryOptions> setup = null)
  Parameters
readerTReaderThe reader that provides forward-only access to data.
conditionFunc<bool>The function delegate that is responsible for the while loop condition.
providerFunc<TReader, TElement>The function delegate that provides data from the specified
reader.workerAction<TElement, T1, T2, T3, T4, T5>The delegate that will perform work while
conditionevaluatestrue.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
TReaderThe type of the
readerthat provides forward-only access to data.TElementThe type of the result provided by
reader.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.