AutoActivationExtensions.ActivateKeyedSingleton Methode

Definitie

Overloads

Name Description
ActivateKeyedSingleton(IServiceCollection, Type, Object)

Dwingt activering van keyed singleton af tijdens het opstarten in plaats van tijdens runtime.

ActivateKeyedSingleton<TService>(IServiceCollection, Object)

Dwingt activering van keyed singleton af tijdens het opstarten in plaats van tijdens runtime.

ActivateKeyedSingleton(IServiceCollection, Type, Object)

Bron:
AutoActivationExtensions.Keyed.cs
Bron:
AutoActivationExtensions.Keyed.cs

Dwingt activering van keyed singleton af tijdens het opstarten in plaats van tijdens runtime.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ ActivateKeyedSingleton(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, Type ^ serviceType, System::Object ^ serviceKey);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection ActivateKeyedSingleton(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Type serviceType, object? serviceKey);
static member ActivateKeyedSingleton : Microsoft.Extensions.DependencyInjection.IServiceCollection * Type * obj -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function ActivateKeyedSingleton (services As IServiceCollection, serviceType As Type, serviceKey As Object) As IServiceCollection

Parameters

services
IServiceCollection

De serviceverzameling waaraan de service moet worden toegevoegd.

serviceType
Type

Het type service dat moet worden geactiveerd.

serviceKey
Object

Een object dat wordt gebruikt om de specifieke service uniek te identificeren.

Retouren

De waarde van services.

Van toepassing op

ActivateKeyedSingleton<TService>(IServiceCollection, Object)

Bron:
AutoActivationExtensions.Keyed.cs
Bron:
AutoActivationExtensions.Keyed.cs

Dwingt activering van keyed singleton af tijdens het opstarten in plaats van tijdens runtime.

public:
generic <typename TService>
 where TService : class[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ ActivateKeyedSingleton(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, System::Object ^ serviceKey);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection ActivateKeyedSingleton<TService>(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, object? serviceKey) where TService : class;
static member ActivateKeyedSingleton : Microsoft.Extensions.DependencyInjection.IServiceCollection * obj -> Microsoft.Extensions.DependencyInjection.IServiceCollection (requires 'Service : null)
<Extension()>
Public Function ActivateKeyedSingleton(Of TService As Class) (services As IServiceCollection, serviceKey As Object) As IServiceCollection

Type parameters

TService

Het type service dat moet worden geactiveerd.

Parameters

services
IServiceCollection

De serviceverzameling die de service bevat.

serviceKey
Object

Een object dat wordt gebruikt om de specifieke service uniek te identificeren.

Retouren

De waarde van services.

Van toepassing op