Summary
Allows registration of an action that's executed after each task has been run.
If a task setup action or a task fails with or without recovery, the specified task teardown action will still be executed.
Syntax
void TaskTeardown<TData>(Action<ITaskTeardownContext, TData> action) where TData : class
Examples
TaskTeardown<Foo>((context, data) =>
{
Information("Finished {0} for {1}", context.Task.Name, data.Place);
});
Type Parameters
| Name |
Description |
| TData |
The data type. |
Parameters
Return Value