FromAsyncOp
(
asyncOperation
)
|
Awaits an AsyncOperation by using a completion source with it's completed delegate
Signature
static Task Meta.WitAi.TaskUtility.FromAsyncOp(AsyncOperation asyncOperation) Parameters asyncOperation: AsyncOperationReturns Task |
FromAsyncResult
(
asyncResult
)
|
Awaits an IAsyncResult using Task.Factory.FromAsync
Signature
static Task Meta.WitAi.TaskUtility.FromAsyncResult(IAsyncResult asyncResult) Parameters asyncResult: IAsyncResultReturns Task |
WaitForTimeout
(
timeoutMs
, getLastUpdate
, completionTask
)
|
Awaits a timeout with the option for updated last update and a completion task if desired to quit early
Signature
static async Task Meta.WitAi.TaskUtility.WaitForTimeout(int timeoutMs, Func< DateTime > getLastUpdate=null, Task completionTask=null) Parameters timeoutMs: intgetLastUpdate: Func< DateTime >completionTask: TaskReturns async Task |
WaitForTurn
(
allTasks
, maxConcurrentTasks
, performTask
)
|
Wait until it is the current task's turn then perform the task
Signature
static async Task Meta.WitAi.TaskUtility.WaitForTurn(List< Task > allTasks, int maxConcurrentTasks, Func< Task > performTask) Parameters allTasks: List< Task >maxConcurrentTasks: intperformTask: Func< Task >Returns async Task |