Method Add
- Namespace
- Icicle
- Assembly
- Icicle.dll
Add<T>(Func<CancellationToken, ValueTask<T>>)
Adds a child task to the scope returning a ResultHandle<T>
public virtual ResultHandle<T> Add<T>(Func<CancellationToken, ValueTask<T>> childTask)
Parameters
childTask
Func<CancellationToken, ValueTask<T>>child task
Returns
- ResultHandle<T>
ResultHandle<T> representing the result of executing the child task
Type Parameters
T
some T
Exceptions
- TaskScopeCompletedException
if Run(RunOptions?, CancellationToken) has already completed on the current TaskScope
Add(Func<CancellationToken, ValueTask>)
Adds a child task to the scope returning a ResultHandle
public virtual ResultHandle Add(Func<CancellationToken, ValueTask> childTask)
Parameters
childTask
Func<CancellationToken, ValueTask>child task
Returns
- ResultHandle
ResultHandle representing the result of executing the child task
Exceptions
- TaskScopeCompletedException
if Run(RunOptions?, CancellationToken) has already completed on the current TaskScope