ResilientTaskServiceCollectionExtensions Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Registration entry points for the resilient-tasks feature. Hosted storage can be configured with an explicit credential and endpoint, or through configuration-bound ResilientTaskSettings on an IHostApplicationBuilder. Without an explicit endpoint, the hosted credential can also be supplied through AddResilientTasks(IServiceCollection, TokenCredential) or a registered TokenCredential service. Lease durations and retry/timeout defaults are configured per task rather than globally.
public static class ResilientTaskServiceCollectionExtensions
type ResilientTaskServiceCollectionExtensions = class
Public Module ResilientTaskServiceCollectionExtensions
- Inheritance
-
ResilientTaskServiceCollectionExtensions
Methods
| Name | Description |
|---|---|
| AddResilientMultiTurnTask<TInput,TOutput,THandler>(IServiceCollection, String, Boolean, Action<TaskRegistrationOptions>) |
Registers a multi-turn task whose handler and dependencies are resolved from a fresh dependency-injection scope for each execution attempt. |
| AddResilientMultiTurnTask<TInput,TOutput,THandler>(IServiceCollection, String, JsonTypeInfo<TInput>, Boolean, Action<TaskRegistrationOptions>) |
Registers a multi-turn scoped task handler using source-generated input serialization metadata. |
| AddResilientMultiTurnTask<TInput,TOutput>(IServiceCollection, String, Func<TaskContext<TInput>,CancellationToken,Task<TOutput>>, Boolean, Action<TaskRegistrationOptions>) |
Registers a multi-turn task (Python |
| AddResilientMultiTurnTask<TInput,TOutput>(IServiceCollection, String, Func<TaskContext<TInput>,CancellationToken,Task<TOutput>>, JsonTypeInfo<TInput>, Boolean, Action<TaskRegistrationOptions>) |
Registers a multi-turn task (optionally steerable) using a source-generated
JsonTypeInfo<T> for the input type (Native-AOT / trimming-safe). The returned
handle is also registered as a keyed singleton service, keyed by |
| AddResilientTask<TInput,TOutput,THandler>(IServiceCollection, String, Action<TaskRegistrationOptions>) |
Registers a one-shot task whose handler and dependencies are resolved from a fresh dependency-injection scope for each execution attempt. |
| AddResilientTask<TInput,TOutput,THandler>(IServiceCollection, String, JsonTypeInfo<TInput>, Action<TaskRegistrationOptions>) |
Registers a one-shot scoped task handler using source-generated input serialization metadata. |
| AddResilientTask<TInput,TOutput>(IServiceCollection, String, Func<TaskContext<TInput>, CancellationToken,Task<TOutput>>, Action<TaskRegistrationOptions>) |
Registers a one-shot task (Python |
| AddResilientTask<TInput,TOutput>(IServiceCollection, String, Func<TaskContext<TInput>, CancellationToken,Task<TOutput>>, JsonTypeInfo<TInput>, Action<TaskRegistrationOptions>) |
Registers a one-shot task using a source-generated JsonTypeInfo<T> for the
input type, so the task input is serialized without runtime reflection (Native-AOT /
trimming-safe). The returned handle is also registered as a keyed singleton service, keyed
by |
| AddResilientTasks(IServiceCollection, TokenCredential) |
Registers the lazy resilient-task services, optionally supplying the hosted-storage credential.
Calling |