DurableTaskExtensions
class
Namespace: Orleans.Durable.Tasks
Provides awaiting, identification, scheduling, timeout, and combinator operations for durable task definitions and handles.
public static class DurableTaskExtensionsMethods
Detached(DurableTask)Returns a configuration which starts the task as an independent root task.Detached(DurableTask, string)Returns a configuration which starts the task as the independent root taskrootId.Detached(DurableTask<TResult>)Returns a configuration which starts the task as an independent root task.Detached(DurableTask<TResult>, string)Returns a configuration which starts the task as the independent root taskrootId.GetAwaiter(DurableTask)Gets an awaiter for a durable task in the current execution context.GetAwaiter(DurableTask<TResult>)Gets an awaiter for a durable task in the current execution context.Post(DurableTask)Stages the start of the task in the caller's durable outbox, and returns its handle without waiting.Post(DurableTask<TResult>)Stages the start of the task in the caller's durable outbox, and returns its handle without waiting.Race(IEnumerable<DurableTask<TResult>>)Creates a durable task which returns the input index and result of the first input task to complete, after requesting cancellation of every other input and waiting until each is terminal.Race(IEnumerable<DurableTask>)Creates a durable task which returns the input index of the first input task to complete, after requesting cancellation of every other input and waiting until each is terminal.Race(IReadOnlyList<ScheduledTask<TResult>>, CancellationToken)Waits for the first scheduled task to complete, requests durable cancellation of every other task, waits until every task is terminal, and returns the first task.Race(IReadOnlyList<ScheduledTask>, CancellationToken)Waits for the first scheduled task to complete, requests durable cancellation of every other task, waits until every task is terminal, and returns the first task.ScheduleAll(IEnumerable<DurableTask<TResult>>)Creates a durable task which schedules every input task and returns their handles, in input order.ScheduleAll(IEnumerable<DurableTask>)Creates a durable task which schedules every input task and returns their handles, in input order.ScheduleAsync(DurableTask<TResult>, CancellationToken)Starts the task and returns its handle once the task's host has accepted and durably stored the task.ScheduleAsync(DurableTask, CancellationToken)Starts the task and returns its handle once the task's host has accepted and durably stored the task.Shielded(DurableTask)Returns a configuration which starts the task as an attached child, or runs it as part of the execution, out of reach of the starting execution's durable cancellation.Shielded(DurableTask<TResult>)Returns a configuration which starts the task as an attached child, or runs it as part of the execution, out of reach of the starting execution's durable cancellation.WaitAsync(DurableTask, TimeSpan)Creates a durable task which runstaskand requests its durable cancellation oncetimeoutelapses.WaitAsync(DurableTask<TResult>, TimeSpan)Creates a durable task which runstask, returns its result, and requests its durable cancellation oncetimeoutelapses.WaitUntilAsync(DurableTask, DateTimeOffset)Creates a durable task which runstaskand requests its durable cancellation oncedueTimepasses.WaitUntilAsync(DurableTask<TResult>, DateTimeOffset)Creates a durable task which runstask, returns its result, and requests its durable cancellation oncedueTimepasses.WhenAll(IEnumerable<DurableTask>)Creates a durable task which completes once every input task has completed.WhenAll(IEnumerable<DurableTask<TResult>>)Creates a durable task which returns the results of every input task, in input order.WhenAll(IReadOnlyList<ScheduledTask>, CancellationToken)Waits for every scheduled task to complete successfully.WhenAll(IReadOnlyList<ScheduledTask<TResult>>, CancellationToken)Waits for every scheduled task to complete successfully.WhenAllCompleted(IEnumerable<DurableTask<TResult>>)Creates a durable task which schedules every input task, waits until each is terminal, and returns their handles, in input order.WhenAllCompleted(IEnumerable<DurableTask>)Creates a durable task which schedules every input task, waits until each is terminal, and returns their handles, in input order.WhenAllCompleted(IReadOnlyList<ScheduledTask<TResult>>, CancellationToken)Waits until every scheduled task is terminal, and returns the tasks in input order.WhenAllCompleted(IReadOnlyList<ScheduledTask>, CancellationToken)Waits until every scheduled task is terminal, and returns the tasks in input order.WhenAny(IEnumerable<DurableTask<TResult>>)Creates a durable task which returns the input index and result of the first input task to complete.WhenAny(IEnumerable<DurableTask>)Creates a durable task which returns the input index of the first input task to complete.WhenAny(IReadOnlyList<ScheduledTask<TResult>>, CancellationToken)Returns the first scheduled task whose response completes, including failed or canceled durable responses. Wait cancellation and transport failures are propagated, and losing waits are canceled without canceling the durable tasks. Candidates are captured when this method is called.WhenAny(IReadOnlyList<ScheduledTask>, CancellationToken)Returns the first scheduled task whose response completes, including failed or canceled durable responses. Wait cancellation and transport failures are propagated, and losing waits are canceled without canceling the durable tasks. Candidates are captured when this method is called.WhenEach(IEnumerable<DurableTask<TResult>>)Schedules every input task and yields each input's handle once, in completion order, as the input reaches a terminal state.WhenEach(IReadOnlyList<ScheduledTask<TResult>>)Yields each scheduled task once, in completion order, as it reaches a terminal state.WhenEach(IEnumerable<DurableTask>)Schedules every input task and yields each input's handle once, in completion order, as the input reaches a terminal state.WhenEach(IReadOnlyList<ScheduledTask>)Yields each scheduled task once, in completion order, as it reaches a terminal state.WithId(DurableTask, string)Returns a configuration which names the task.WithId(DurableTask<TResult>, string)Returns a configuration which names the task.
