CakeTaskBuilderOfTExtensions.

Finally<TData>(CakeTaskBuilder<TData>, Func<ICakeContext, TData, Task>) Method

Summary

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

Syntax

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

Type Parameters

Name Description
TData The type of the data context.

Parameters

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

Return Value

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