WaitAsync(DurableTask<TResult>, TimeSpan)
staticextension
public static DurableTask<TResult> WaitAsync<TResult>(this DurableTask<TResult> task, TimeSpan timeout) Creates a durable task which runs
task, returns its result, and requests its durable cancellation once timeout elapses. Parameters
taskDurableTask<TResult>- The task to run.
timeoutTimeSpan- The time to wait before requesting cancellation, which is zero or positive.
Returns
A combinator which, awaited within a durable execution, runs as part of that execution and completes once
task is terminal. Exceptions
System.ArgumentNullExceptiontaskisnull.System.ArgumentOutOfRangeExceptiontimeoutis negative, includingSystem.Threading.Timeout.InfiniteTimeSpan; await the task itself to wait without a timeout.
