CakeTaskBuilderExtensions.

DoesForEach<TData, TItem>(CakeTaskBuilder, Func<TData, IEnumerable<TItem>>, Action<TItem>) 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
CakeTaskBuilderExtensions

Syntax

public static CakeTaskBuilder DoesForEach<TData, TItem>(CakeTaskBuilder builder, Func<TData, IEnumerable<TItem>> itemsFunc, Action<TItem> 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 The task builder.
itemsFunc Func<TData, IEnumerable<TItem>> The items.
action Action<TItem> The action.

Return Value

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