Share via


AsyncStateHttpContextExtensions.AddAsyncStateHttpContext Method

Definition

Adds default implementations for IAsyncState, IAsyncContext<T>, and Microsoft.Extensions.AsyncState.IAsyncLocalContext`1 services, scoped to the lifetime of HttpContext instances. Please note that implementations of these interfaces are not thread safe.

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

Parameters

services
IServiceCollection

The IServiceCollection to add the service to.

Returns

The value of services.

Exceptions

services is null.

Applies to