ServiceCollectionExtensions.AddAsyncAdapterSupport(IServiceCollection) Method

Definition

Adds background task and activity processing support to the specified service collection, enabling asynchronous task execution via hosted services and task queues.

public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddAsyncAdapterSupport(this Microsoft.Extensions.DependencyInjection.IServiceCollection services);
static member AddAsyncAdapterSupport : Microsoft.Extensions.DependencyInjection.IServiceCollection -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddAsyncAdapterSupport (services As IServiceCollection) As IServiceCollection

Parameters

services
IServiceCollection

The service collection to which the background task and activity processing services will be added. Cannot be null.

Returns

Remarks

This method registers hosted services and singleton task queues required for background and activity processing. It is safe to call multiple times; services are only added if not already present. Use this method to enable asynchronous task and activity handling in applications that require background processing.

Applies to