Udostępnij za pośrednictwem


NamedServiceCollectionExtensions Class

Definition

Extensions for adding named services to INamedServiceProvider<TService>.

public ref class NamedServiceCollectionExtensions abstract sealed
public static class NamedServiceCollectionExtensions
type NamedServiceCollectionExtensions = class
Public Module NamedServiceCollectionExtensions
Inheritance
NamedServiceCollectionExtensions

Methods

AddNamedSingleton<TService,TImplementation>(IServiceCollection, String)

Adds a singleton named service of the type specific in TService to the specified IServiceCollection.

AddNamedSingleton<TService>(IServiceCollection, String, Func<IServiceProvider,TService>)

Adds a singleton named service of the type specific in TService to the specified IServiceCollection.

AddNamedSingleton<TService>(IServiceCollection, String)

Adds a singleton named service of the type specific in TService to the specified IServiceCollection.

AddNamedTransient<TService>(IServiceCollection, String, Func<IServiceProvider,TService>)

Adds a transient named service of the type specific in TService to the specified IServiceCollection.

AddNamedTransient<TService>(IServiceCollection, String)

Adds a transient named service of the type specific in TService to the specified IServiceCollection.

Applies to