ForEach Method
Definition
- Assemblies
- Cuemon.Threading.dll
ForEach<TSource>(IEnumerable<TSource>, Action<TSource>, Action<AsyncTaskFactoryOptions>)
Executes a parallel foreach loop.
public static void ForEach<TSource>(IEnumerable<TSource> source, Action<TSource> worker, Action<AsyncTaskFactoryOptions> setup = null)
Parameters
sourceIEnumerable<TSource>The sequence to iterate over parallel.
workerAction<TSource>The delegate that is invoked once per iteration.
setupAction<AsyncTaskFactoryOptions>The AsyncTaskFactoryOptions which may be configured.
Type Parameters
TSourceThe type of the data in the source.
ForEach<TSource, T>(IEnumerable<TSource>, Action<TSource, T>, T, Action<AsyncTaskFactoryOptions>)
Executes a parallel foreach loop.
public static void ForEach<TSource, T>(IEnumerable<TSource> source, Action<TSource, T> worker, T arg, Action<AsyncTaskFactoryOptions> setup = null)
Parameters
sourceIEnumerable<TSource>The sequence to iterate over parallel.
workerAction<TSource, T>The delegate that is invoked once per iteration.
argTThe parameter of the delegate
worker.setupAction<AsyncTaskFactoryOptions>The AsyncTaskFactoryOptions which may be configured.
Type Parameters
TSourceThe type of the data in the source.
TThe type of the parameter of the delegate
worker.
ForEach<TSource, T1, T2>(IEnumerable<TSource>, Action<TSource, T1, T2>, T1, T2, Action<AsyncTaskFactoryOptions>)
Executes a parallel foreach loop.
public static void ForEach<TSource, T1, T2>(IEnumerable<TSource> source, Action<TSource, T1, T2> worker, T1 arg1, T2 arg2, Action<AsyncTaskFactoryOptions> setup = null)
Parameters
sourceIEnumerable<TSource>The sequence to iterate over parallel.
workerAction<TSource, T1, T2>The delegate that is invoked once per iteration.
arg1T1The first parameter of the delegate
worker.arg2T2The second parameter of the delegate
worker.setupAction<AsyncTaskFactoryOptions>The AsyncTaskFactoryOptions which may be configured.
Type Parameters
TSourceThe type of the data in the source.
T1The type of the first parameter of the delegate
worker.T2The type of the second parameter of the delegate
worker.
ForEach<TSource, T1, T2, T3>(IEnumerable<TSource>, Action<TSource, T1, T2, T3>, T1, T2, T3, Action<AsyncTaskFactoryOptions>)
Executes a parallel foreach loop.
public static void ForEach<TSource, T1, T2, T3>(IEnumerable<TSource> source, Action<TSource, T1, T2, T3> worker, T1 arg1, T2 arg2, T3 arg3, Action<AsyncTaskFactoryOptions> setup = null)
Parameters
sourceIEnumerable<TSource>The sequence to iterate over parallel.
workerAction<TSource, T1, T2, T3>The delegate that is invoked once per iteration.
arg1T1The first parameter of the delegate
worker.arg2T2The second parameter of the delegate
worker.arg3T3The third parameter of the delegate
worker.setupAction<AsyncTaskFactoryOptions>The AsyncTaskFactoryOptions which may be configured.
Type Parameters
TSourceThe type of the data in the source.
T1The type of the first parameter of the delegate
worker.T2The type of the second parameter of the delegate
worker.T3The type of the third parameter of the delegate
worker.
ForEach<TSource, T1, T2, T3, T4>(IEnumerable<TSource>, Action<TSource, T1, T2, T3, T4>, T1, T2, T3, T4, Action<AsyncTaskFactoryOptions>)
Executes a parallel foreach loop.
public static void ForEach<TSource, T1, T2, T3, T4>(IEnumerable<TSource> source, Action<TSource, T1, T2, T3, T4> worker, T1 arg1, T2 arg2, T3 arg3, T4 arg4, Action<AsyncTaskFactoryOptions> setup = null)
Parameters
sourceIEnumerable<TSource>The sequence to iterate over parallel.
workerAction<TSource, T1, T2, T3, T4>The delegate that is invoked once per iteration.
arg1T1The first parameter of the delegate
worker.arg2T2The second parameter of the delegate
worker.arg3T3The third parameter of the delegate
worker.arg4T4The fourth parameter of the delegate
worker.setupAction<AsyncTaskFactoryOptions>The AsyncTaskFactoryOptions which may be configured.
Type Parameters
TSourceThe type of the data in the source.
T1The type of the first parameter of the delegate
worker.T2The type of the second parameter of the delegate
worker.T3The type of the third parameter of the delegate
worker.T4The type of the fourth parameter of the delegate
worker.
ForEach<TSource, T1, T2, T3, T4, T5>(IEnumerable<TSource>, Action<TSource, T1, T2, T3, T4, T5>, T1, T2, T3, T4, T5, Action<AsyncTaskFactoryOptions>)
Executes a parallel foreach loop.
public static void ForEach<TSource, T1, T2, T3, T4, T5>(IEnumerable<TSource> source, Action<TSource, T1, T2, T3, T4, T5> worker, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, Action<AsyncTaskFactoryOptions> setup = null)
Parameters
sourceIEnumerable<TSource>The sequence to iterate over parallel.
workerAction<TSource, T1, T2, T3, T4, T5>The delegate that is invoked once per iteration.
arg1T1The first parameter of the delegate
worker.arg2T2The second parameter of the delegate
worker.arg3T3The third parameter of the delegate
worker.arg4T4The fourth parameter of the delegate
worker.arg5T5The fifth parameter of the delegate
worker.setupAction<AsyncTaskFactoryOptions>The AsyncTaskFactoryOptions which may be configured.
Type Parameters
TSourceThe type of the data in the source.
T1The type of the first parameter of the delegate
worker.T2The type of the second parameter of the delegate
worker.T3The type of the third parameter of the delegate
worker.T4The type of the fourth parameter of the delegate
worker.T5The type of the fifth parameter of the delegate
worker.