Waits for the System.Threading.Tasks.Task
to complete execution, then returns its result.
Overloads
- WaitAndReturn()
- WaitAndReturn(int)
- WaitAndReturn(int, TResult)
- WaitAndReturn(TimeSpan)
- WaitAndReturn(TimeSpan, TResult)
- WaitAndReturn(CancellationToken)
- WaitAndReturn(CancellationToken, TResult)
- WaitAndReturn(int, CancellationToken)
- WaitAndReturn(int, CancellationToken, TResult)
Waits for the System.Threading.Tasks.Task
to complete execution, then returns its result.
public static TResult WaitAndReturn<TResult>(this Task<TResult> task);
Waits for the System.Threading.Tasks.Task
to complete execution within a specified number of milliseconds, then returns its result.
public static TResult WaitAndReturn<TResult>(this Task<TResult> task, int millisecondsTimeout);
returns default(TResult)
if timeout.
Waits for the System.Threading.Tasks.Task
to complete execution within a specified number of milliseconds, then returns its result.
public static TResult WaitAndReturn<TResult>(this Task<TResult> task, int millisecondsTimeout, TResult returnValueIfTimeout);
returns returnValueIfTimeout
if timeout.
Waits for the System.Threading.Tasks.Task
to complete execution within a specified time interval, then returns its result.
public static TResult WaitAndReturn<TResult>(this Task<TResult> task, TimeSpan timeout);
returns default(TResult)
if timeout.
Waits for the System.Threading.Tasks.Task
to complete execution within a specified time interval, then returns its result.
public static TResult WaitAndReturn<TResult>(this Task<TResult> task, TimeSpan timeout, TResult returnValueIfTimeout);
returns returnValueIfTimeout
if timeout.
Waits for the System.Threading.Tasks.Task
to complete execution or until cancellation token is canceled, then returns its result.
public static TResult WaitAndReturn<TResult>(this Task<TResult> task, CancellationToken cancellationToken);
returns default(TResult)
if canceled.
Waits for the System.Threading.Tasks.Task
to complete execution or until cancellation token is canceled, then returns its result.
public static TResult WaitAndReturn<TResult>(this Task<TResult> task, CancellationToken cancellationToken, TResult returnValueIfCanceled);
returns returnValueIfCanceled
if canceled.
Waits for the System.Threading.Tasks.Task
to complete execution within a specified number of milliseconds or until cancellation token is canceled, then returns its result.
public static TResult WaitAndReturn<TResult>(this Task<TResult> task, int millisecondsTimeout, CancellationToken cancellationToken);
returns default(TResult)
if timeout or canceled.
Waits for the System.Threading.Tasks.Task
to complete execution within a specified number of milliseconds or until cancellation token is canceled, then returns its result.
public static TResult WaitAndReturn<TResult>(this Task<TResult> task, int millisecondsTimeout, CancellationToken cancellationToken, TResult returnValueIfTimeoutOrCanceled);
returns returnValueIfTimeoutOrCanceled
if timeout or canceled.