Table of Contents

Class AdvancedParallelFactory

Namespace
Cuemon.Threading
Assembly
Cuemon.Threading.dll

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

current T

The current value of the counter in a for-loop.

relational RelationalOperator

One of the enumeration values that specifies the rules to apply as the relational operator for left-hand operand current and right-hand operand repeats.

repeats T

The amount of repeats to do according to the rules specified by relational.

Returns

Boolean

true if current does not meet the condition of relational and repeats; otherwise false.

Type Parameters

T

The type of the counter in a for-loop.

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

rules ForLoopRuleset<TOperand>

The rules of a for-loop control flow statement.

worker Action<TOperand>

The delegate that is invoked once per iteration.

setup Action<AsyncTaskFactoryOptions>

The AsyncTaskFactoryOptions which may be configured.

Type Parameters

TOperand

The type of the number used with the loop control variable.

Exceptions

ArgumentNullException

rules cannot be null -or- worker cannot 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

rules ForLoopRuleset<TOperand>

The rules of a for-loop control flow statement.

worker Action<TOperand, T>

The delegate that is invoked once per iteration.

arg T

The parameter of the delegate worker.

setup Action<AsyncTaskFactoryOptions>

The AsyncTaskFactoryOptions which may be configured.

Type Parameters

TOperand

The type of the number used with the loop control variable.

T

The type of the parameter of the delegate worker.

Exceptions

ArgumentNullException

rules cannot be null -or- worker cannot 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

rules ForLoopRuleset<TOperand>

The rules of a for-loop control flow statement.

worker Action<TOperand, T1, T2>

The delegate that is invoked once per iteration.

arg1 T1

The first parameter of the delegate worker.

arg2 T2

The second parameter of the delegate worker.

setup Action<AsyncTaskFactoryOptions>

The AsyncTaskFactoryOptions which may be configured.

Type Parameters

TOperand

The type of the number used with the loop control variable.

T1

The type of the first parameter of the delegate worker.

T2

The type of the second parameter of the delegate worker.

Exceptions

ArgumentNullException

rules cannot be null -or- worker cannot 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

rules ForLoopRuleset<TOperand>

The rules of a for-loop control flow statement.

worker Action<TOperand, T1, T2, T3>

The delegate that is invoked once per iteration.

arg1 T1

The first parameter of the delegate worker.

arg2 T2

The second parameter of the delegate worker.

arg3 T3

The third parameter of the delegate worker.

setup Action<AsyncTaskFactoryOptions>

The AsyncTaskFactoryOptions which may be configured.

Type Parameters

TOperand

The type of the number used with the loop control variable.

T1

The type of the first parameter of the delegate worker.

T2

The type of the second parameter of the delegate worker.

T3

The type of the third parameter of the delegate worker.

Exceptions

ArgumentNullException

rules cannot be null -or- worker cannot 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

rules ForLoopRuleset<TOperand>

The rules of a for-loop control flow statement.

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

The delegate that is invoked once per iteration.

arg1 T1

The first parameter of the delegate worker.

arg2 T2

The second parameter of the delegate worker.

arg3 T3

The third parameter of the delegate worker.

arg4 T4

The fourth parameter of the delegate worker.

setup Action<AsyncTaskFactoryOptions>

The AsyncTaskFactoryOptions which may be configured.

Type Parameters

TOperand

The type of the number used with the loop control variable.

T1

The type of the first parameter of the delegate worker.

T2

The type of the second parameter of the delegate worker.

T3

The type of the third parameter of the delegate worker.

T4

The type of the fourth parameter of the delegate worker.

Exceptions

ArgumentNullException

rules cannot be null -or- worker cannot 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

rules ForLoopRuleset<TOperand>

The rules of a for-loop control flow statement.

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

The delegate that is invoked once per iteration.

arg1 T1

The first parameter of the delegate worker.

arg2 T2

The second parameter of the delegate worker.

arg3 T3

The third parameter of the delegate worker.

arg4 T4

The fourth parameter of the delegate worker.

arg5 T5

The fifth parameter of the delegate worker.

setup Action<AsyncTaskFactoryOptions>

The AsyncTaskFactoryOptions which may be configured.

Type Parameters

TOperand

The type of the number used with the loop control variable.

T1

The type of the first parameter of the delegate worker.

T2

The type of the second parameter of the delegate worker.

T3

The type of the third parameter of the delegate worker.

T4

The type of the fourth parameter of the delegate worker.

T5

The type of the fifth parameter of the delegate worker.

Exceptions

ArgumentNullException

rules cannot be null -or- worker cannot be null.

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

rules ForLoopRuleset<TOperand>

The rules of a for-loop control flow statement.

worker Func<TOperand, CancellationToken, Task>

The Task based function delegate that is invoked once per iteration.

setup Action<AsyncWorkloadOptions>

The AsyncWorkloadOptions which may be configured.

Returns

Task

A Task that represents the asynchronous operation.

Type Parameters

TOperand

The type of the number used with the loop control variable.

Exceptions

ArgumentNullException

rules cannot be null -or- worker cannot 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

rules ForLoopRuleset<TOperand>

The rules of a for-loop control flow statement.

worker Func<TOperand, T, CancellationToken, Task>

The Task based function delegate that is invoked once per iteration.

arg T

The parameter of the delegate worker.

setup Action<AsyncWorkloadOptions>

The AsyncWorkloadOptions which may be configured.

Returns

Task

A Task that represents the asynchronous operation.

Type Parameters

TOperand

The type of the number used with the loop control variable.

T

The type of the parameter of the delegate worker.

Exceptions

ArgumentNullException

rules cannot be null -or- worker cannot 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

rules ForLoopRuleset<TOperand>

The rules of a for-loop control flow statement.

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

The Task based function delegate that is invoked once per iteration.

arg1 T1

The first parameter of the delegate worker.

arg2 T2

The second parameter of the delegate worker.

setup Action<AsyncWorkloadOptions>

The AsyncWorkloadOptions which may be configured.

Returns

Task

A Task that represents the asynchronous operation.

Type Parameters

TOperand

The type of the number used with the loop control variable.

T1

The type of the first parameter of the delegate worker.

T2

The type of the second parameter of the delegate worker.

Exceptions

ArgumentNullException

rules cannot be null -or- worker cannot 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

rules ForLoopRuleset<TOperand>

The rules of a for-loop control flow statement.

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

The Task based function delegate that is invoked once per iteration.

arg1 T1

The first parameter of the delegate worker.

arg2 T2

The second parameter of the delegate worker.

arg3 T3

The third parameter of the delegate worker.

setup Action<AsyncWorkloadOptions>

The AsyncWorkloadOptions which may be configured.

Returns

Task

A Task that represents the asynchronous operation.

Type Parameters

TOperand

The type of the number used with the loop control variable.

T1

The type of the first parameter of the delegate worker.

T2

The type of the second parameter of the delegate worker.

T3

The type of the third parameter of the delegate worker.

Exceptions

ArgumentNullException

rules cannot be null -or- worker cannot 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

rules ForLoopRuleset<TOperand>

The rules of a for-loop control flow statement.

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

The Task based function delegate that is invoked once per iteration.

arg1 T1

The first parameter of the delegate worker.

arg2 T2

The second parameter of the delegate worker.

arg3 T3

The third parameter of the delegate worker.

arg4 T4

The fourth parameter of the delegate worker.

setup Action<AsyncWorkloadOptions>

The AsyncWorkloadOptions which may be configured.

Returns

Task

A Task that represents the asynchronous operation.

Type Parameters

TOperand

The type of the number used with the loop control variable.

T1

The type of the first parameter of the delegate worker.

T2

The type of the second parameter of the delegate worker.

T3

The type of the third parameter of the delegate worker.

T4

The type of the fourth parameter of the delegate worker.

Exceptions

ArgumentNullException

rules cannot be null -or- worker cannot 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

rules ForLoopRuleset<TOperand>

The rules of a for-loop control flow statement.

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

The Task based function delegate that is invoked once per iteration.

arg1 T1

The first parameter of the delegate worker.

arg2 T2

The second parameter of the delegate worker.

arg3 T3

The third parameter of the delegate worker.

arg4 T4

The fourth parameter of the delegate worker.

arg5 T5

The fifth parameter of the delegate worker.

setup Action<AsyncWorkloadOptions>

The AsyncWorkloadOptions which may be configured.

Returns

Task

A Task that represents the asynchronous operation.

Type Parameters

TOperand

The type of the number used with the loop control variable.

T1

The type of the first parameter of the delegate worker.

T2

The type of the second parameter of the delegate worker.

T3

The type of the third parameter of the delegate worker.

T4

The type of the fourth parameter of the delegate worker.

T5

The type of the fifth parameter of the delegate worker.

Exceptions

ArgumentNullException

rules cannot be null -or- worker cannot 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

rules ForLoopRuleset<TOperand>

The rules of a for-loop control flow statement.

worker Func<TOperand, TResult>

The delegate that is invoked once per iteration.

setup Action<AsyncTaskFactoryOptions>

The AsyncTaskFactoryOptions which may be configured.

Returns

IReadOnlyCollection<TResult>

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

Type Parameters

TOperand

The type of the number used with the loop control variable.

TResult

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

Exceptions

ArgumentNullException

rules cannot be null -or- worker cannot 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

rules ForLoopRuleset<TOperand>

The rules of a for-loop control flow statement.

worker Func<TOperand, T, TResult>

The delegate that is invoked once per iteration.

arg T

The parameter of the function delegate worker.

setup Action<AsyncTaskFactoryOptions>

The AsyncTaskFactoryOptions which may be configured.

Returns

IReadOnlyCollection<TResult>

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

Type Parameters

TOperand

The type of the number used with the loop control variable.

T

The type of the parameter of the function delegate worker.

TResult

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

Exceptions

ArgumentNullException

rules cannot be null -or- worker cannot 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

rules ForLoopRuleset<TOperand>

The rules of a for-loop control flow statement.

worker Func<TOperand, T1, T2, TResult>

The delegate that is invoked once per iteration.

arg1 T1

The first parameter of the function delegate worker.

arg2 T2

The second parameter of the function delegate worker.

setup Action<AsyncTaskFactoryOptions>

The AsyncTaskFactoryOptions which may be configured.

Returns

IReadOnlyCollection<TResult>

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

Type Parameters

TOperand

The type of the number used with the loop control variable.

T1

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

T2

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

TResult

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

Exceptions

ArgumentNullException

rules cannot be null -or- worker cannot 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

rules ForLoopRuleset<TOperand>

The rules of a for-loop control flow statement.

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

The delegate that is invoked once per iteration.

arg1 T1

The first parameter of the function delegate worker.

arg2 T2

The second parameter of the function delegate worker.

arg3 T3

The third parameter of the function delegate worker.

setup Action<AsyncTaskFactoryOptions>

The AsyncTaskFactoryOptions which may be configured.

Returns

IReadOnlyCollection<TResult>

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

Type Parameters

TOperand

The type of the number used with the loop control variable.

T1

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

T2

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

T3

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

TResult

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

Exceptions

ArgumentNullException

rules cannot be null -or- worker cannot 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

rules ForLoopRuleset<TOperand>

The rules of a for-loop control flow statement.

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

The delegate that is invoked once per iteration.

arg1 T1

The first parameter of the function delegate worker.

arg2 T2

The second parameter of the function delegate worker.

arg3 T3

The third parameter of the function delegate worker.

arg4 T4

The fourth parameter of the function delegate worker.

setup Action<AsyncTaskFactoryOptions>

The AsyncTaskFactoryOptions which may be configured.

Returns

IReadOnlyCollection<TResult>

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

Type Parameters

TOperand

The type of the number used with the loop control variable.

T1

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

T2

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

T3

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

T4

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

TResult

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

Exceptions

ArgumentNullException

rules cannot be null -or- worker cannot 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

rules ForLoopRuleset<TOperand>

The rules of a for-loop control flow statement.

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

The delegate that is invoked once per iteration.

arg1 T1

The first parameter of the function delegate worker.

arg2 T2

The second parameter of the function delegate worker.

arg3 T3

The third parameter of the function delegate worker.

arg4 T4

The fourth parameter of the function delegate worker.

arg5 T5

The fifth parameter of the function delegate worker.

setup Action<AsyncTaskFactoryOptions>

The AsyncTaskFactoryOptions which may be configured.

Returns

IReadOnlyCollection<TResult>

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

Type Parameters

TOperand

The type of the number used with the loop control variable.

T1

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

T2

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

T3

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

T4

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

T5

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

TResult

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

Exceptions

ArgumentNullException

rules cannot be null -or- worker cannot 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

rules ForLoopRuleset<TOperand>

The rules of a for-loop control flow statement.

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

The delegate that is invoked once per iteration.

setup Action<AsyncWorkloadOptions>

The AsyncWorkloadOptions which may be configured.

Returns

Task<IReadOnlyCollection<TResult>>

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

Type Parameters

TOperand

The type of the number used with the loop control variable.

TResult

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

Exceptions

ArgumentNullException

rules cannot be null -or- worker cannot 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

rules ForLoopRuleset<TOperand>

The rules of a for-loop control flow statement.

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

The delegate that is invoked once per iteration.

arg T

The parameter of the function delegate worker.

setup Action<AsyncWorkloadOptions>

The AsyncWorkloadOptions which may be configured.

Returns

Task<IReadOnlyCollection<TResult>>

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

Type Parameters

TOperand

The type of the number used with the loop control variable.

T

The type of the parameter of the function delegate worker.

TResult

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

Exceptions

ArgumentNullException

rules cannot be null -or- worker cannot 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

rules ForLoopRuleset<TOperand>

The rules of a for-loop control flow statement.

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

The delegate that is invoked once per iteration.

arg1 T1

The first parameter of the function delegate worker.

arg2 T2

The second parameter of the function delegate worker.

setup Action<AsyncWorkloadOptions>

The AsyncWorkloadOptions which may be configured.

Returns

Task<IReadOnlyCollection<TResult>>

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

Type Parameters

TOperand

The type of the number used with the loop control variable.

T1

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

T2

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

TResult

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

Exceptions

ArgumentNullException

rules cannot be null -or- worker cannot 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

rules ForLoopRuleset<TOperand>

The rules of a for-loop control flow statement.

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

The delegate that is invoked once per iteration.

arg1 T1

The first parameter of the function delegate worker.

arg2 T2

The second parameter of the function delegate worker.

arg3 T3

The third parameter of the function delegate worker.

setup Action<AsyncWorkloadOptions>

The AsyncWorkloadOptions which may be configured.

Returns

Task<IReadOnlyCollection<TResult>>

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

Type Parameters

TOperand

The type of the number used with the loop control variable.

T1

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

T2

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

T3

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

TResult

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

Exceptions

ArgumentNullException

rules cannot be null -or- worker cannot 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

rules ForLoopRuleset<TOperand>

The rules of a for-loop control flow statement.

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

The delegate that is invoked once per iteration.

arg1 T1

The first parameter of the function delegate worker.

arg2 T2

The second parameter of the function delegate worker.

arg3 T3

The third parameter of the function delegate worker.

arg4 T4

The fourth parameter of the function delegate worker.

setup Action<AsyncWorkloadOptions>

The AsyncWorkloadOptions which may be configured.

Returns

Task<IReadOnlyCollection<TResult>>

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

Type Parameters

TOperand

The type of the number used with the loop control variable.

T1

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

T2

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

T3

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

T4

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

TResult

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

Exceptions

ArgumentNullException

rules cannot be null -or- worker cannot 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

rules ForLoopRuleset<TOperand>

The rules of a for-loop control flow statement.

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

The delegate that is invoked once per iteration.

arg1 T1

The first parameter of the function delegate worker.

arg2 T2

The second parameter of the function delegate worker.

arg3 T3

The third parameter of the function delegate worker.

arg4 T4

The fourth parameter of the function delegate worker.

arg5 T5

The fifth parameter of the function delegate worker.

setup Action<AsyncWorkloadOptions>

The AsyncWorkloadOptions which may be configured.

Returns

Task<IReadOnlyCollection<TResult>>

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

Type Parameters

TOperand

The type of the number used with the loop control variable.

T1

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

T2

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

T3

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

T4

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

T5

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

TResult

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

Exceptions

ArgumentNullException

rules cannot be null -or- worker cannot 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

current T

The current value of the counter in a for-loop.

assignment AssignmentOperator

One of the enumeration values that specifies the rules to apply as the assignment operator for left-hand operand current and right-hand operand step.

step T

The value to assign to current according to the rule specified by assignment.

Returns

T

The computed result of current having the assignment of step.

Type Parameters

T

The type of the counter in a for-loop.

While<TReader, TElement>(TReader, Func<Boolean>, 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

reader TReader

The reader that provides forward-only access to data.

condition Func<Boolean>

The function delegate that is responsible for the while loop condition.

provider Func<TReader, TElement>

The function delegate that provides data from the specified reader.

worker Action<TElement>

The delegate that will perform work while condition evaluates true.

setup Action<AsyncTaskFactoryOptions>

The AsyncTaskFactoryOptions which may be configured.

Type Parameters

TReader

The type of the reader that provides forward-only access to data.

TElement

The type of the result provided by reader.

While<TReader, TElement, T>(TReader, Func<Boolean>, 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

reader TReader

The reader that provides forward-only access to data.

condition Func<Boolean>

The function delegate that is responsible for the while loop condition.

provider Func<TReader, TElement>

The function delegate that provides data from the specified reader.

worker Action<TElement, T>

The delegate that will perform work while condition evaluates true.

arg T

The parameter of the delegate worker.

setup Action<AsyncTaskFactoryOptions>

The AsyncTaskFactoryOptions which may be configured.

Type Parameters

TReader

The type of the reader that provides forward-only access to data.

TElement

The type of the result provided by reader.

T

The type of the parameter of the delegate worker.

While<TReader, TElement, T1, T2>(TReader, Func<Boolean>, 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

reader TReader

The reader that provides forward-only access to data.

condition Func<Boolean>

The function delegate that is responsible for the while loop condition.

provider Func<TReader, TElement>

The function delegate that provides data from the specified reader.

worker Action<TElement, T1, T2>

The delegate that will perform work while condition evaluates true.

arg1 T1

The first parameter of the delegate worker.

arg2 T2

The second parameter of the delegate worker.

setup Action<AsyncTaskFactoryOptions>

The AsyncTaskFactoryOptions which may be configured.

Type Parameters

TReader

The type of the reader that provides forward-only access to data.

TElement

The type of the result provided by reader.

T1

The type of the first parameter of the delegate worker.

T2

The type of the second parameter of the delegate worker.

While<TReader, TElement, T1, T2, T3>(TReader, Func<Boolean>, 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

reader TReader

The reader that provides forward-only access to data.

condition Func<Boolean>

The function delegate that is responsible for the while loop condition.

provider Func<TReader, TElement>

The function delegate that provides data from the specified reader.

worker Action<TElement, T1, T2, T3>

The delegate that will perform work while condition evaluates true.

arg1 T1

The first parameter of the delegate worker.

arg2 T2

The second parameter of the delegate worker.

arg3 T3

The third parameter of the delegate worker.

setup Action<AsyncTaskFactoryOptions>

The AsyncTaskFactoryOptions which may be configured.

Type Parameters

TReader

The type of the reader that provides forward-only access to data.

TElement

The type of the result provided by reader.

T1

The type of the first parameter of the delegate worker.

T2

The type of the second parameter of the delegate worker.

T3

The type of the third parameter of the delegate worker.

While<TReader, TElement, T1, T2, T3, T4>(TReader, Func<Boolean>, 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

reader TReader

The reader that provides forward-only access to data.

condition Func<Boolean>

The function delegate that is responsible for the while loop condition.

provider Func<TReader, TElement>

The function delegate that provides data from the specified reader.

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

The delegate that will perform work while condition evaluates true.

arg1 T1

The first parameter of the delegate worker.

arg2 T2

The second parameter of the delegate worker.

arg3 T3

The third parameter of the delegate worker.

arg4 T4

The fourth parameter of the delegate worker.

setup Action<AsyncTaskFactoryOptions>

The AsyncTaskFactoryOptions which may be configured.

Type Parameters

TReader

The type of the reader that provides forward-only access to data.

TElement

The type of the result provided by reader.

T1

The type of the first parameter of the delegate worker.

T2

The type of the second parameter of the delegate worker.

T3

The type of the third parameter of the delegate worker.

T4

The type of the fourth parameter of the delegate worker.

While<TReader, TElement, T1, T2, T3, T4, T5>(TReader, Func<Boolean>, 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

reader TReader

The reader that provides forward-only access to data.

condition Func<Boolean>

The function delegate that is responsible for the while loop condition.

provider Func<TReader, TElement>

The function delegate that provides data from the specified reader.

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

The delegate that will perform work while condition evaluates true.

arg1 T1

The first parameter of the delegate worker.

arg2 T2

The second parameter of the delegate worker.

arg3 T3

The third parameter of the delegate worker.

arg4 T4

The fourth parameter of the delegate worker.

arg5 T5

The fifth parameter of the delegate worker.

setup Action<AsyncTaskFactoryOptions>

The AsyncTaskFactoryOptions which may be configured.

Type Parameters

TReader

The type of the reader that provides forward-only access to data.

TElement

The type of the result provided by reader.

T1

The type of the first parameter of the delegate worker.

T2

The type of the second parameter of the delegate worker.

T3

The type of the third parameter of the delegate worker.

T4

The type of the fourth parameter of the delegate worker.

T5

The type of the fifth parameter of the delegate worker.

WhileAsync<TReader, TElement>(TReader, Func<Task<Boolean>>, 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

reader TReader

The reader that provides forward-only access to data.

condition Func<Task<Boolean>>

The function delegate that is responsible for the while loop condition.

provider Func<TReader, TElement>

The function delegate that provides data from the specified reader.

worker Func<TElement, CancellationToken, Task>

The delegate that will perform work while condition evaluates true.

setup Action<AsyncWorkloadOptions>

The AsyncWorkloadOptions which may be configured.

Returns

Task

A Task that represents the asynchronous operation.

Type Parameters

TReader

The type of the reader that provides forward-only access to data.

TElement

The type of the result provided by reader.

WhileAsync<TReader, TElement, T>(TReader, Func<Task<Boolean>>, 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

reader TReader

The reader that provides forward-only access to data.

condition Func<Task<Boolean>>

The function delegate that is responsible for the while loop condition.

provider Func<TReader, TElement>

The function delegate that provides data from the specified reader.

worker Func<TElement, T, CancellationToken, Task>

The delegate that will perform work while condition evaluates true.

arg T

The parameter of the delegate worker.

setup Action<AsyncWorkloadOptions>

The AsyncWorkloadOptions which may be configured.

Returns

Task

A Task that represents the asynchronous operation.

Type Parameters

TReader

The type of the reader that provides forward-only access to data.

TElement

The type of the result provided by reader.

T

The type of the parameter of the delegate worker.

WhileAsync<TReader, TElement, T1, T2>(TReader, Func<Task<Boolean>>, 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

reader TReader

The reader that provides forward-only access to data.

condition Func<Task<Boolean>>

The function delegate that is responsible for the while loop condition.

provider Func<TReader, TElement>

The function delegate that provides data from the specified reader.

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

The delegate that will perform work while condition evaluates true.

arg1 T1

The first parameter of the delegate worker.

arg2 T2

The second parameter of the delegate worker.

setup Action<AsyncWorkloadOptions>

The AsyncWorkloadOptions which may be configured.

Returns

Task

A Task that represents the asynchronous operation.

Type Parameters

TReader

The type of the reader that provides forward-only access to data.

TElement

The type of the result provided by reader.

T1

The type of the first parameter of the delegate worker.

T2

The type of the second parameter of the delegate worker.

WhileAsync<TReader, TElement, T1, T2, T3>(TReader, Func<Task<Boolean>>, 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

reader TReader

The reader that provides forward-only access to data.

condition Func<Task<Boolean>>

The function delegate that is responsible for the while loop condition.

provider Func<TReader, TElement>

The function delegate that provides data from the specified reader.

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

The delegate that will perform work while condition evaluates true.

arg1 T1

The first parameter of the delegate worker.

arg2 T2

The second parameter of the delegate worker.

arg3 T3

The third parameter of the delegate worker.

setup Action<AsyncWorkloadOptions>

The AsyncWorkloadOptions which may be configured.

Returns

Task

A Task that represents the asynchronous operation.

Type Parameters

TReader

The type of the reader that provides forward-only access to data.

TElement

The type of the result provided by reader.

T1

The type of the first parameter of the delegate worker.

T2

The type of the second parameter of the delegate worker.

T3

The type of the third parameter of the delegate worker.

WhileAsync<TReader, TElement, T1, T2, T3, T4>(TReader, Func<Task<Boolean>>, 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

reader TReader

The reader that provides forward-only access to data.

condition Func<Task<Boolean>>

The function delegate that is responsible for the while loop condition.

provider Func<TReader, TElement>

The function delegate that provides data from the specified reader.

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

The delegate that will perform work while condition evaluates true.

arg1 T1

The first parameter of the delegate worker.

arg2 T2

The second parameter of the delegate worker.

arg3 T3

The third parameter of the delegate worker.

arg4 T4

The fourth parameter of the delegate worker.

setup Action<AsyncWorkloadOptions>

The AsyncWorkloadOptions which may be configured.

Returns

Task

A Task that represents the asynchronous operation.

Type Parameters

TReader

The type of the reader that provides forward-only access to data.

TElement

The type of the result provided by reader.

T1

The type of the first parameter of the delegate worker.

T2

The type of the second parameter of the delegate worker.

T3

The type of the third parameter of the delegate worker.

T4

The type of the fourth parameter of the delegate worker.

WhileAsync<TReader, TElement, T1, T2, T3, T4, T5>(TReader, Func<Task<Boolean>>, 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

reader TReader

The reader that provides forward-only access to data.

condition Func<Task<Boolean>>

The function delegate that is responsible for the while loop condition.

provider Func<TReader, TElement>

The function delegate that provides data from the specified reader.

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

The delegate that will perform work while condition evaluates true.

arg1 T1

The first parameter of the delegate worker.

arg2 T2

The second parameter of the delegate worker.

arg3 T3

The third parameter of the delegate worker.

arg4 T4

The fourth parameter of the delegate worker.

arg5 T5

The fifth parameter of the delegate worker.

setup Action<AsyncWorkloadOptions>

The AsyncWorkloadOptions which may be configured.

Returns

Task

A Task that represents the asynchronous operation.

Type Parameters

TReader

The type of the reader that provides forward-only access to data.

TElement

The type of the result provided by reader.

T1

The type of the first parameter of the delegate worker.

T2

The type of the second parameter of the delegate worker.

T3

The type of the third parameter of the delegate worker.

T4

The type of the fourth parameter of the delegate worker.

T5

The type of the fifth parameter of the delegate worker.

WhileResult<TReader, TElement, TResult>(TReader, Func<Boolean>, 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

reader TReader

The reader that provides forward-only access to data.

condition Func<Boolean>

The function delegate that is responsible for the while loop condition.

provider Func<TReader, TElement>

The function delegate that provides data from the specified reader.

worker Func<TElement, TResult>

The delegate that will perform work while condition evaluates true.

setup Action<AsyncTaskFactoryOptions>

The AsyncTaskFactoryOptions which may be configured.

Returns

IReadOnlyCollection<TResult>

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

Type Parameters

TReader

The type of the reader that provides forward-only access to data.

TElement

The type of the result provided by reader.

TResult

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

WhileResult<TReader, TElement, T, TResult>(TReader, Func<Boolean>, 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

reader TReader

The reader that provides forward-only access to data.

condition Func<Boolean>

The function delegate that is responsible for the while loop condition.

provider Func<TReader, TElement>

The function delegate that provides data from the specified reader.

worker Func<TElement, T, TResult>

The delegate that will perform work while condition evaluates true.

arg T

The parameter of the delegate worker.

setup Action<AsyncTaskFactoryOptions>

The AsyncTaskFactoryOptions which may be configured.

Returns

IReadOnlyCollection<TResult>

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

Type Parameters

TReader

The type of the reader that provides forward-only access to data.

TElement

The type of the result provided by reader.

T

The type of the parameter of the delegate worker.

TResult

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

WhileResult<TReader, TElement, T1, T2, TResult>(TReader, Func<Boolean>, 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

reader TReader

The reader that provides forward-only access to data.

condition Func<Boolean>

The function delegate that is responsible for the while loop condition.

provider Func<TReader, TElement>

The function delegate that provides data from the specified reader.

worker Func<TElement, T1, T2, TResult>

The delegate that will perform work while condition evaluates true.

arg1 T1

The first parameter of the delegate worker.

arg2 T2

The second parameter of the delegate worker.

setup Action<AsyncTaskFactoryOptions>

The AsyncTaskFactoryOptions which may be configured.

Returns

IReadOnlyCollection<TResult>

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

Type Parameters

TReader

The type of the reader that provides forward-only access to data.

TElement

The type of the result provided by reader.

T1

The type of the first parameter of the delegate worker.

T2

The type of the second parameter of the delegate worker.

TResult

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

WhileResult<TReader, TElement, T1, T2, T3, TResult>(TReader, Func<Boolean>, 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

reader TReader

The reader that provides forward-only access to data.

condition Func<Boolean>

The function delegate that is responsible for the while loop condition.

provider Func<TReader, TElement>

The function delegate that provides data from the specified reader.

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

The delegate that will perform work while condition evaluates true.

arg1 T1

The first parameter of the delegate worker.

arg2 T2

The second parameter of the delegate worker.

arg3 T3

The third parameter of the delegate worker.

setup Action<AsyncTaskFactoryOptions>

The AsyncTaskFactoryOptions which may be configured.

Returns

IReadOnlyCollection<TResult>

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

Type Parameters

TReader

The type of the reader that provides forward-only access to data.

TElement

The type of the result provided by reader.

T1

The type of the first parameter of the delegate worker.

T2

The type of the second parameter of the delegate worker.

T3

The type of the third parameter of the delegate worker.

TResult

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

WhileResult<TReader, TElement, T1, T2, T3, T4, TResult>(TReader, Func<Boolean>, 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

reader TReader

The reader that provides forward-only access to data.

condition Func<Boolean>

The function delegate that is responsible for the while loop condition.

provider Func<TReader, TElement>

The function delegate that provides data from the specified reader.

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

The delegate that will perform work while condition evaluates true.

arg1 T1

The first parameter of the delegate worker.

arg2 T2

The second parameter of the delegate worker.

arg3 T3

The third parameter of the delegate worker.

arg4 T4

The fourth parameter of the delegate worker.

setup Action<AsyncTaskFactoryOptions>

The AsyncTaskFactoryOptions which may be configured.

Returns

IReadOnlyCollection<TResult>

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

Type Parameters

TReader

The type of the reader that provides forward-only access to data.

TElement

The type of the result provided by reader.

T1

The type of the first parameter of the delegate worker.

T2

The type of the second parameter of the delegate worker.

T3

The type of the third parameter of the delegate worker.

T4

The type of the fourth parameter of the delegate worker.

TResult

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

WhileResult<TReader, TElement, T1, T2, T3, T4, T5, TResult>(TReader, Func<Boolean>, 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

reader TReader

The reader that provides forward-only access to data.

condition Func<Boolean>

The function delegate that is responsible for the while loop condition.

provider Func<TReader, TElement>

The function delegate that provides data from the specified reader.

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

The delegate that will perform work while condition evaluates true.

arg1 T1

The first parameter of the delegate worker.

arg2 T2

The second parameter of the delegate worker.

arg3 T3

The third parameter of the delegate worker.

arg4 T4

The fourth parameter of the delegate worker.

arg5 T5

The fifth parameter of the delegate worker.

setup Action<AsyncTaskFactoryOptions>

The AsyncTaskFactoryOptions which may be configured.

Returns

IReadOnlyCollection<TResult>

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

Type Parameters

TReader

The type of the reader that provides forward-only access to data.

TElement

The type of the result provided by reader.

T1

The type of the first parameter of the delegate worker.

T2

The type of the second parameter of the delegate worker.

T3

The type of the third parameter of the delegate worker.

T4

The type of the fourth parameter of the delegate worker.

T5

The type of the fifth parameter of the delegate worker.

TResult

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

WhileResultAsync<TReader, TElement, TResult>(TReader, Func<Task<Boolean>>, 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

reader TReader

The reader that provides forward-only access to data.

condition Func<Task<Boolean>>

The function delegate that is responsible for the while loop condition.

provider Func<TReader, TElement>

The function delegate that provides data from the specified reader.

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

The delegate that will perform work while condition evaluates true.

setup Action<AsyncWorkloadOptions>

The AsyncWorkloadOptions which may be configured.

Returns

Task<IReadOnlyCollection<TResult>>

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

Type Parameters

TReader

The type of the reader that provides forward-only access to data.

TElement

The type of the result provided by reader.

TResult

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

WhileResultAsync<TReader, TElement, T, TResult>(TReader, Func<Task<Boolean>>, 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

reader TReader

The reader that provides forward-only access to data.

condition Func<Task<Boolean>>

The function delegate that is responsible for the while loop condition.

provider Func<TReader, TElement>

The function delegate that provides data from the specified reader.

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

The delegate that will perform work while condition evaluates true.

arg T

The parameter of the delegate worker.

setup Action<AsyncWorkloadOptions>

The AsyncWorkloadOptions which may be configured.

Returns

Task<IReadOnlyCollection<TResult>>

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

Type Parameters

TReader

The type of the reader that provides forward-only access to data.

TElement

The type of the result provided by reader.

T

The type of the parameter of the delegate worker.

TResult

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

WhileResultAsync<TReader, TElement, T1, T2, TResult>(TReader, Func<Task<Boolean>>, 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

reader TReader

The reader that provides forward-only access to data.

condition Func<Task<Boolean>>

The function delegate that is responsible for the while loop condition.

provider Func<TReader, TElement>

The function delegate that provides data from the specified reader.

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

The delegate that will perform work while condition evaluates true.

arg1 T1

The first parameter of the delegate worker.

arg2 T2

The second parameter of the delegate worker.

setup Action<AsyncWorkloadOptions>

The AsyncWorkloadOptions which may be configured.

Returns

Task<IReadOnlyCollection<TResult>>

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

Type Parameters

TReader

The type of the reader that provides forward-only access to data.

TElement

The type of the result provided by reader.

T1

The type of the first parameter of the delegate worker.

T2

The type of the second parameter of the delegate worker.

TResult

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

WhileResultAsync<TReader, TElement, T1, T2, T3, TResult>(TReader, Func<Task<Boolean>>, 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

reader TReader

The reader that provides forward-only access to data.

condition Func<Task<Boolean>>

The function delegate that is responsible for the while loop condition.

provider Func<TReader, TElement>

The function delegate that provides data from the specified reader.

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

The delegate that will perform work while condition evaluates true.

arg1 T1

The first parameter of the delegate worker.

arg2 T2

The second parameter of the delegate worker.

arg3 T3

The third parameter of the delegate worker.

setup Action<AsyncWorkloadOptions>

The AsyncWorkloadOptions which may be configured.

Returns

Task<IReadOnlyCollection<TResult>>

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

Type Parameters

TReader

The type of the reader that provides forward-only access to data.

TElement

The type of the result provided by reader.

T1

The type of the first parameter of the delegate worker.

T2

The type of the second parameter of the delegate worker.

T3

The type of the third parameter of the delegate worker.

TResult

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

WhileResultAsync<TReader, TElement, T1, T2, T3, T4, TResult>(TReader, Func<Task<Boolean>>, 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

reader TReader

The reader that provides forward-only access to data.

condition Func<Task<Boolean>>

The function delegate that is responsible for the while loop condition.

provider Func<TReader, TElement>

The function delegate that provides data from the specified reader.

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

The delegate that will perform work while condition evaluates true.

arg1 T1

The first parameter of the delegate worker.

arg2 T2

The second parameter of the delegate worker.

arg3 T3

The third parameter of the delegate worker.

arg4 T4

The fourth parameter of the delegate worker.

setup Action<AsyncWorkloadOptions>

The AsyncWorkloadOptions which may be configured.

Returns

Task<IReadOnlyCollection<TResult>>

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

Type Parameters

TReader

The type of the reader that provides forward-only access to data.

TElement

The type of the result provided by reader.

T1

The type of the first parameter of the delegate worker.

T2

The type of the second parameter of the delegate worker.

T3

The type of the third parameter of the delegate worker.

T4

The type of the fourth parameter of the delegate worker.

TResult

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

WhileResultAsync<TReader, TElement, T1, T2, T3, T4, T5, TResult>(TReader, Func<Task<Boolean>>, 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

reader TReader

The reader that provides forward-only access to data.

condition Func<Task<Boolean>>

The function delegate that is responsible for the while loop condition.

provider Func<TReader, TElement>

The function delegate that provides data from the specified reader.

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

The delegate that will perform work while condition evaluates true.

arg1 T1

The first parameter of the delegate worker.

arg2 T2

The second parameter of the delegate worker.

arg3 T3

The third parameter of the delegate worker.

arg4 T4

The fourth parameter of the delegate worker.

arg5 T5

The fifth parameter of the delegate worker.

setup Action<AsyncWorkloadOptions>

The AsyncWorkloadOptions which may be configured.

Returns

Task<IReadOnlyCollection<TResult>>

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

Type Parameters

TReader

The type of the reader that provides forward-only access to data.

TElement

The type of the result provided by reader.

T1

The type of the first parameter of the delegate worker.

T2

The type of the second parameter of the delegate worker.

T3

The type of the third parameter of the delegate worker.

T4

The type of the fourth parameter of the delegate worker.

T5

The type of the fifth parameter of the delegate worker.

TResult

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

See Also