Прочитај на енглеском

Делите путем


AutoActivationExtensions Class

Definition

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Extension methods for automatically activating singletons after application starts.

C#
public static class AutoActivationExtensions
Inheritance
AutoActivationExtensions

Methods

ActivateKeyedSingleton(IServiceCollection, Type, Object)

Enforces keyed singleton activation at startup time rather than at runtime.

ActivateKeyedSingleton<TService>(IServiceCollection, Object)

Enforces keyed singleton activation at startup time rather than at runtime.

ActivateSingleton(IServiceCollection, Type)

Enforces singleton activation at startup time rather than at runtime.

ActivateSingleton<TService>(IServiceCollection)

Enforces singleton activation at startup time rather than at runtime.

AddActivatedKeyedSingleton(IServiceCollection, Type, Object, Func<IServiceProvider,Object,Object>)

Adds an auto-activated keyed singleton service.

AddActivatedKeyedSingleton(IServiceCollection, Type, Object, Type)

Adds an auto-activated keyed singleton service.

AddActivatedKeyedSingleton(IServiceCollection, Type, Object)

Adds an auto-activated keyed singleton service.

AddActivatedKeyedSingleton<TService,TImplementation>(IServiceCollection, Object, Func<IServiceProvider,Object,TImplementation>)

Adds an auto-activated keyed singleton service.

AddActivatedKeyedSingleton<TService,TImplementation>(IServiceCollection, Object)

Adds an auto-activated keyed singleton service.

AddActivatedKeyedSingleton<TService>(IServiceCollection, Object, Func<IServiceProvider,Object,TService>)

Adds an auto-activated keyed singleton service.

AddActivatedKeyedSingleton<TService>(IServiceCollection, Object)

Adds an auto-activated keyed singleton service.

AddActivatedSingleton(IServiceCollection, Type, Func<IServiceProvider,Object>)

Adds an auto-activated singleton service.

AddActivatedSingleton(IServiceCollection, Type, Type)

Adds an auto-activated singleton service.

AddActivatedSingleton(IServiceCollection, Type)

Adds an auto-activated singleton service of the type specified in serviceType to the specified IServiceCollection.

AddActivatedSingleton<TService,TImplementation>(IServiceCollection, Func<IServiceProvider,TImplementation>)

Adds an auto-activated singleton service.

AddActivatedSingleton<TService,TImplementation>(IServiceCollection)

Adds an auto-activated singleton service.

AddActivatedSingleton<TService>(IServiceCollection, Func<IServiceProvider,TService>)

Adds an auto-activated singleton service.

AddActivatedSingleton<TService>(IServiceCollection)

Adds an auto-activated singleton service.

TryAddActivatedKeyedSingleton(IServiceCollection, Type, Object, Func<IServiceProvider,Object,Object>)

Tries to add an auto-activated keyed singleton service.

TryAddActivatedKeyedSingleton(IServiceCollection, Type, Object, Type)

Tries to add an auto-activated keyed singleton service.

TryAddActivatedKeyedSingleton(IServiceCollection, Type, Object)

Tries to add an auto-activated keyed singleton service.

TryAddActivatedKeyedSingleton<TService,TImplementation>(IServiceCollection, Object)

Tries to add an auto-activated keyed singleton service.

TryAddActivatedKeyedSingleton<TService>(IServiceCollection, Object, Func<IServiceProvider,Object,TService>)

Tries to add an auto-activated keyed singleton service.

TryAddActivatedKeyedSingleton<TService>(IServiceCollection, Object)

Tries to add an auto-activated keyed singleton service.

TryAddActivatedSingleton(IServiceCollection, Type, Func<IServiceProvider,Object>)

Tries to add an auto-activated singleton service.

TryAddActivatedSingleton(IServiceCollection, Type, Type)

Tries to add an auto-activated singleton service.

TryAddActivatedSingleton(IServiceCollection, Type)

Tries to add an auto-activated singleton service.

TryAddActivatedSingleton<TService,TImplementation>(IServiceCollection)

Tries to add an auto-activated singleton service.

TryAddActivatedSingleton<TService>(IServiceCollection, Func<IServiceProvider,TService>)

Tries to add an auto-activated singleton service.

TryAddActivatedSingleton<TService>(IServiceCollection)

Tries to add an auto-activated singleton service.

Applies to

Производ Верзије
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)