CakeTaskBuilderOfTExtensions.

DoesForEach<TData, TItem>(CakeTaskBuilder<TData>, Func<TData, ICakeContext, IEnumerable<TItem>>, Action<TData, TItem, ICakeContext>) Method

Summary

Adds an action to be executed foreach item returned by the items function. This method will be executed the first time the task is executed.
Namespace
Cake.Core
Containing Type
CakeTaskBuilderOfTExtensions

Syntax

public static CakeTaskBuilder<TData> DoesForEach<TData, TItem>(this CakeTaskBuilder<TData> builder, Func<TData, ICakeContext, IEnumerable<TItem>> itemsFunc, Action<TData, TItem, ICakeContext> action) 
    where TData : class

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.
itemsFunc Func<TData, ICakeContext, IEnumerable<TItem>> The items.
action Action<TData, TItem, ICakeContext> The action.

Return Value

Type Description
CakeTaskBuilder<TData> The same CakeTaskBuilder<TData> instance so that multiple calls can be chained.