Skip to content

DurableTask.Run(Func<ValueTask<TResult>>)

Run(Func<ValueTask<TResult>>)

static
View source
public static DurableTask<TResult> Run<TResult>(Func<ValueTask<TResult>> function)
Creates an unstarted step which runs asynchronous function as a child execution when it is awaited, scheduled, or posted.

Parameters

functionFunc<ValueTask<TResult>>
The asynchronous function which the child runs.

Returns

A definition which runs the function each time it is awaited, scheduled, or posted.

Exceptions

System.ArgumentNullException
function is null.