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