Summary
Adds an asynchronous action to be executed foreach item returned by the items function.
This method will be executed the first time the task is executed.
Syntax
public static CakeTaskBuilder DoesForEach<TItem>(this CakeTaskBuilder builder, Func<ICakeContext, IEnumerable<TItem>> itemsFunc, Func<TItem, ICakeContext, Task> action)
Examples
Task("Pack")
.DoesForEach(context => new[] { "net10.0" }, async (tfm, context) =>
{
await System.Threading.Tasks.Task.Delay(10);
context.Log.Information("Packing {0}", tfm);
});
Type Parameters
| Name |
Description |
| TItem |
The item type. |
Parameters
Return Value