Compartilhar via


AsyncStateExtensions.AddAsyncState(IServiceCollection) Método

Definição

Adiciona implementações padrão para IAsyncStateserviços , IAsyncContext<T>e Microsoft.Extensions.AsyncState.IAsyncLocalContext`1 . Observe que as implementações dessas interfaces não são thread-safe.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ AddAsyncState(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddAsyncState (this Microsoft.Extensions.DependencyInjection.IServiceCollection services);
static member AddAsyncState : Microsoft.Extensions.DependencyInjection.IServiceCollection -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddAsyncState (services As IServiceCollection) As IServiceCollection

Parâmetros

services
IServiceCollection

O contêiner de injeção de dependência ao qual adicionar as implementações.

Retornos

O valor de services.

Exceções

services é null.

Aplica-se a