Summary
Adds an action to be executed foreach item in the asynchronous list.
This method will be executed the first time the task is executed.
Syntax
public static CakeTaskBuilder<TData> DoesForEach<TData, TItem>(this CakeTaskBuilder<TData> builder, IAsyncEnumerable<TItem> items, Action<TData, TItem, ICakeContext> action)
where TData : class
Examples
TaskOf<Foo>("Pack")
.DoesForEach(GetFrameworksAsync(), (data, tfm, context) =>
{
context.Log.Information("Packing {0} for {1}", tfm, data.Place);
});
Type Parameters
| Name |
Description |
| TData |
The type of the data context. |
| TItem |
The item type. |
Parameters
| Name |
Type |
Description |
| builder |
CakeTaskBuilder<TData> |
The task builder. |
| items |
IAsyncEnumerable<TItem> |
The items. |
| action |
Action<TData, TItem, ICakeContext> |
The action. |
Return Value