Summary
Adds a finally handler to be executed after the task have finished executing.
Syntax
public static CakeTaskBuilder<TData> Finally<TData>(this CakeTaskBuilder<TData> builder, Func<ICakeContext, TData, Task> finallyHandler)
where TData : class
Examples
TaskOf<Foo>("Risky")
.Finally(async (context, data) =>
{
context.Log.Information("done {0}", data.Place);
await System.Threading.Tasks.Task.CompletedTask;
})
.Does((context, data) => { });
Type Parameters
| Name |
Description |
| TData |
The type of the data context. |
Parameters
Return Value