TaskUtilities..::..ForEachAsync<(Of <(<'T>)>)> Method (IReadOnlyCollection<(Of <(<'T>)>)>, Func<(Of <(<'T, Task>)>)>)
In parallel, performs the same asynchronous action on each element in the list.
Namespace:
Tortuga.AnchorAssembly: Tortuga.Anchor (in Tortuga.Anchor.dll)
Syntax
public static Task ForEachAsync<T>( IReadOnlyCollection<T> list, Func<T, Task> action )
Public Shared Function ForEachAsync(Of T) ( _ list As IReadOnlyCollection(Of T), _ action As Func(Of T, Task) _ ) As Task
Type Parameters
- T
Parameters
- list
- Type: IReadOnlyCollection<(Of <(<'T>)>)>
The list of input values to be passed to the action.
- action
- Type: Func<(Of <(<'T, Task>)>)>
The action to be performed on each element in the list.