Method AddPreTask
AddPreTask(Func<bool, ValueTask>)
Prepends the task with the specified task action, which is executed before the task begins.
Declaration
public void AddPreTask(Func<bool, ValueTask> task)
Parameters
| Type | Name | Description |
|---|---|---|
| Func<bool, ValueTask> | task | The task action to execute before the task begins - the argument represents |
Remarks
The purpose of this is so that you can insert additional logic before the task begins (e.g., so you can implement a wrapper method around a task).
Tasks should not throw OperationCanceledException if IsSucceeding is false.