<PackageReference Include="Nito.AsyncEx.Tasks" Version="5.0.0-pre-02" />

Nito.AsyncEx.TaskExtensions

public static class TaskExtensions
Provides extension methods for the Task and Task<T> types.
public static Task WaitAsync(this Task this, CancellationToken cancellationToken)

Asynchronously waits for the task to complete, or for the cancellation token to be canceled.

public static Task<TResult> WaitAsync<TResult>(this Task<TResult> this, CancellationToken cancellationToken)

Asynchronously waits for the task to complete, or for the cancellation token to be canceled.

public static Task WhenAll(this IEnumerable<Task> this)

Asynchronously waits for all of the source tasks to complete.

public static Task<TResult[]> WhenAll<TResult>(this IEnumerable<Task<TResult>> this)

Asynchronously waits for all of the source tasks to complete.

public static Task<Task> WhenAny(this IEnumerable<Task> this, CancellationToken cancellationToken)

Asynchronously waits for any of the source tasks to complete, or for the cancellation token to be canceled.

public static Task<Task> WhenAny(this IEnumerable<Task> this)

Asynchronously waits for any of the source tasks to complete.

public static Task<Task<TResult>> WhenAny<TResult>(this IEnumerable<Task<TResult>> this, CancellationToken cancellationToken)

Asynchronously waits for any of the source tasks to complete, or for the cancellation token to be canceled.

public static Task<Task<TResult>> WhenAny<TResult>(this IEnumerable<Task<TResult>> this)

Asynchronously waits for any of the source tasks to complete.