ValueTaskUtility Class

Provides utility methods to deal with ValueTask objects.

public static class ValueTaskUtility

Methods

NameDescription
WhenAll(IEnumerable<ValueTask>)Creates a task that will complete when all of the ValueTask objects in an enumerable collection have completed.
WhenAll(ValueTask[])Creates a task that will complete when all of the ValueTask objects in an enumerable collection have completed.

WhenAll overloads

WhenAll(IEnumerable<ValueTask>)

Creates a task that will complete when all of the ValueTask objects in an enumerable collection have completed.

public static ValueTask WhenAll(IEnumerable<ValueTask> valueTasks)
Parameters
valueTasks IEnumerable<ValueTask>
The ValueTasks to wait on for completion.
Returns

ValueTask A ValueTask that represents the completion of all of the supplied ValueTasks.

Exceptions
ArgumentNullException
valueTasks is null.

WhenAll(ValueTask[])

Creates a task that will complete when all of the ValueTask objects in an enumerable collection have completed.

public static ValueTask WhenAll(params ValueTask[] valueTasks)
Parameters
valueTasks ValueTask[]
The ValueTasks to wait on for completion.
Returns

ValueTask A ValueTask that represents the completion of all of the supplied ValueTasks.

Exceptions
ArgumentNullException
valueTasks is null.