Summary
Adds an asynchronous action to be executed foreach item in the list.
Syntax
public static CakeTaskBuilder DoesForEach<TItem>(this CakeTaskBuilder builder, IEnumerable<TItem> items, Func<TItem, Task> action)
Examples
Task("Pack")
.DoesForEach(new[] { "net10.0", "net11.0" }, async tfm =>
{
await System.Threading.Tasks.Task.Delay(10);
Information("Packing {0}", tfm);
});
Type Parameters
| Name |
Description |
| TItem |
The item type. |
Parameters
| Name |
Type |
Description |
| builder |
CakeTaskBuilder |
The task builder. |
| items |
IEnumerable<TItem> |
The items. |
| action |
Func<TItem, Task> |
The action. |
Return Value