Comparteix a través de


AsyncStateExtensions.AddAsyncState(IServiceCollection) Método

Definición

Agrega implementaciones predeterminadas para IAsyncStatelos servicios , IAsyncContext<T>y Microsoft.Extensions.AsyncState.IAsyncLocalContext`1 . Tenga en cuenta que las implementaciones de estas interfaces no son seguras para subprocesos.

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

Contenedor de inserción de dependencias al que se van a agregar las implementaciones.

Devoluciones

El valor de services.

Excepciones

services es null.

Se aplica a