Skip to content

DurableTaskExtensions.WhenAny(IEnumerable<DurableTask>)

WhenAny(IEnumerable<DurableTask>)

staticextension
View source
public static DurableTask<int> WhenAny(this IEnumerable<DurableTask> tasks)
Creates a durable task which returns the input index of the first input task to complete.

Parameters

tasksIEnumerable<DurableTask>
The input tasks.

Returns

A combinator which, awaited within a durable execution, runs as part of that execution.

Exceptions

System.ArgumentOutOfRangeException
tasks is empty.