AsyncStateExtensions.AddAsyncState(IServiceCollection) Methode

Definitie

Voegt standaard implementaties toe voor IAsyncState, IAsyncContext<T> en Microsoft.Extensions.AsyncState.IAsyncLocalContext`1-services. Houd er rekening mee dat implementaties van deze interfaces niet thread-veilig zijn.

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

Parameters

services
IServiceCollection

De container voor afhankelijkheidsinjectie waaraan de implementaties moeten worden toegevoegd.

Retouren

De waarde van services.

Uitzonderingen

services is null.

Van toepassing op