ServiceCollectionExtensions.ConfigureDurableWorkflows Method
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.
Configures durable workflows, automatically registering orchestrations and activities.
public static Microsoft.Extensions.DependencyInjection.IServiceCollection ConfigureDurableWorkflows(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Action<Microsoft.Agents.AI.DurableTask.Workflows.DurableWorkflowOptions> configure, Action<Microsoft.DurableTask.Worker.IDurableTaskWorkerBuilder>? workerBuilder = default, Action<Microsoft.DurableTask.Client.IDurableTaskClientBuilder>? clientBuilder = default);
static member ConfigureDurableWorkflows : Microsoft.Extensions.DependencyInjection.IServiceCollection * Action<Microsoft.Agents.AI.DurableTask.Workflows.DurableWorkflowOptions> * Action<Microsoft.DurableTask.Worker.IDurableTaskWorkerBuilder> * Action<Microsoft.DurableTask.Client.IDurableTaskClientBuilder> -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function ConfigureDurableWorkflows (services As IServiceCollection, configure As Action(Of DurableWorkflowOptions), Optional workerBuilder As Action(Of IDurableTaskWorkerBuilder) = Nothing, Optional clientBuilder As Action(Of IDurableTaskClientBuilder) = Nothing) As IServiceCollection
Parameters
- services
- IServiceCollection
The service collection to configure.
- configure
- Action<DurableWorkflowOptions>
A delegate to configure the workflow options.
- workerBuilder
- Action<IDurableTaskWorkerBuilder>
Optional delegate to configure the durable task worker.
- clientBuilder
- Action<IDurableTaskClientBuilder>
Optional delegate to configure the durable task client.
Returns
The service collection for chaining.
Remarks
This method provides a workflow-focused configuration experience. If you need to configure both agents and workflows, consider using ConfigureDurableOptions(IServiceCollection, Action<DurableOptions>, Action<IDurableTaskWorkerBuilder>, Action<IDurableTaskClientBuilder>) instead.
Multiple calls to this method are supported and configurations are composed additively.