CakeTaskBuilderExtensions.

WithCriteria<TData>(CakeTaskBuilder, Func<TData, bool>) Method

Summary

Adds a criteria that has to be fulfilled for the task to run. The criteria is evaluated when traversal of the graph occurs.
Namespace
Cake.Core
Containing Type
CakeTaskBuilderExtensions

Syntax

public static CakeTaskBuilder WithCriteria<TData>(this CakeTaskBuilder builder, Func<TData, bool> criteria) 
    where TData : class

Type Parameters

Name Description
TData The type of the data context.

Parameters

Name Type Description
builder CakeTaskBuilder The task builder.
criteria Func<TData, bool> The criteria.

Return Value

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