Summary
Allows registration of an action that's executed after all other tasks have been run.
If a setup action or a task fails with or without recovery, the specified teardown action will still be executed.
Syntax
public void Teardown<TData>(Action<ITeardownContext, TData> action) where TData : class
Examples
Teardown((context, data) => {
context.Log.Information("Goodbye {0}!", data.Place);
});
Type Parameters
Name |
Description |
TData |
The data type. |
Parameters
Name |
Type |
Description |
action |
Action<ITeardownContext, TData> |
The action to be executed. |
Return Value