Summary
Adds an action to be executed when the task is invoked.
Syntax
public static CakeTaskBuilder Does<TData>(this CakeTaskBuilder builder, Func<TData, Task> func)
where TData : class
Examples
Task("Hello")
.Does<Foo>(async data =>
{
await System.Threading.Tasks.Task.Delay(100);
Information("Hello {0}", data.Place);
});
Type Parameters
| Name |
Description |
| TData |
The type of the data context. |
Parameters
| Name |
Type |
Description |
| builder |
CakeTaskBuilder |
The task builder. |
| func |
Func<TData, Task> |
The action. |
Return Value