CakeTaskBuilderExtensions.

Finally<TData>(CakeTaskBuilder, Action<ICakeContext, TData>) Method

Summary

Adds a finally handler to be executed after the task have finished executing.
Namespace
Cake.Core
Containing Type
CakeTaskBuilderExtensions

Syntax

public static CakeTaskBuilder Finally<TData>(this CakeTaskBuilder builder, Action<ICakeContext, TData> finallyHandler) 
    where TData : class

Type Parameters

Name Description
TData The extra data to operate with inside the finally handler.

Parameters

Name Type Description
builder CakeTaskBuilder The builder.
finallyHandler Action<ICakeContext, TData> The finally handler.

Return Value

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