Method Task
Task(Func<T, bool>, CancellationToken)
Wait until predicate is met, or until token is called. A null predicate can be passed to have it await any change.
Declaration
public Task<T> Task(Func<T, bool> awaitPredicate, CancellationToken token = default)
Parameters
Type | Name | Description |
---|---|---|
Func<T, bool> | awaitPredicate | Callback to be executed on completion of task. |
CancellationToken | token | Token used to trigger a cancellation of the task. |
Returns
Type | Description |
---|---|
Task<T> | Task to schedule. |
Implements
Task(T, CancellationToken)
Wait until BindableVariable is set to awaitState
.
Declaration
public Task<T> Task(T awaitState, CancellationToken token = default)
Parameters
Type | Name | Description |
---|---|---|
T | awaitState | Variable state to wait for. |
CancellationToken | token | Token used to trigger a cancellation of the task. |
Returns
Type | Description |
---|---|
Task<T> | Task to schedule. |