Поділитися через


ServiceCollectionServiceExtensions Class

Definition

Extension methods for adding services to an IServiceCollection.

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

Methods

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

Adds a scoped service of the type specified in serviceType with a factory specified in implementationFactory to the specified IServiceCollection.

AddKeyedScoped(IServiceCollection, Type, Object, Type)

Adds a scoped service of the type specified in serviceType with an implementation of the type specified in implementationType to the specified IServiceCollection.

AddKeyedScoped(IServiceCollection, Type, Object)

Adds a scoped service of the type specified in serviceType to the specified IServiceCollection.

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

Adds a scoped service of the type specified in TService with an implementation type specified in TImplementation using the factory specified in implementationFactory to the specified IServiceCollection.

AddKeyedScoped<TService,TImplementation>(IServiceCollection, Object)

Adds a scoped service of the type specified in TService with an implementation type specified in TImplementation to the specified IServiceCollection.

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

Adds a scoped service of the type specified in TService with a factory specified in implementationFactory to the specified IServiceCollection.

AddKeyedScoped<TService>(IServiceCollection, Object)

Adds a scoped service of the type specified in TService to the specified IServiceCollection.

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

Adds a singleton service of the type specified in serviceType with a factory specified in implementationFactory to the specified IServiceCollection.

AddKeyedSingleton(IServiceCollection, Type, Object, Object)

Adds a singleton service of the type specified in serviceType with an instance specified in implementationInstance to the specified IServiceCollection.

AddKeyedSingleton(IServiceCollection, Type, Object, Type)

Adds a singleton service of the type specified in serviceType with an implementation of the type specified in implementationType to the specified IServiceCollection.

AddKeyedSingleton(IServiceCollection, Type, Object)

Adds a singleton service of the type specified in serviceType to the specified IServiceCollection.

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

Adds a singleton service of the type specified in TService with an implementation type specified in TImplementation using the factory specified in implementationFactory to the specified IServiceCollection.

AddKeyedSingleton<TService,TImplementation>(IServiceCollection, Object)

Adds a singleton service of the type specified in TService with an implementation type specified in TImplementation to the specified IServiceCollection.

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

Adds a singleton service of the type specified in TService with a factory specified in implementationFactory to the specified IServiceCollection.

AddKeyedSingleton<TService>(IServiceCollection, Object, TService)

Adds a singleton service of the type specified in TService with an instance specified in implementationInstance to the specified IServiceCollection.

AddKeyedSingleton<TService>(IServiceCollection, Object)

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

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

Adds a transient service of the type specified in serviceType with a factory specified in implementationFactory to the specified IServiceCollection.

AddKeyedTransient(IServiceCollection, Type, Object, Type)

Adds a transient service of the type specified in serviceType with an implementation of the type specified in implementationType to the specified IServiceCollection.

AddKeyedTransient(IServiceCollection, Type, Object)

Adds a transient service of the type specified in serviceType to the specified IServiceCollection.

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

Adds a transient service of the type specified in TService with an implementation type specified in TImplementation using the factory specified in implementationFactory to the specified IServiceCollection.

AddKeyedTransient<TService,TImplementation>(IServiceCollection, Object)

Adds a transient service of the type specified in TService with an implementation type specified in TImplementation to the specified IServiceCollection.

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

Adds a transient service of the type specified in TService with a factory specified in implementationFactory to the specified IServiceCollection.

AddKeyedTransient<TService>(IServiceCollection, Object)

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

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

Adds a scoped service of the type specified in serviceType with a factory specified in implementationFactory to the specified IServiceCollection.

AddScoped(IServiceCollection, Type, Type)

Adds a scoped service of the type specified in serviceType with an implementation of the type specified in implementationType to the specified IServiceCollection.

AddScoped(IServiceCollection, Type)

Adds a scoped service of the type specified in serviceType to the specified IServiceCollection.

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

Adds a scoped service of the type specified in TService with an implementation type specified in TImplementation using the factory specified in implementationFactory to the specified IServiceCollection.

AddScoped<TService,TImplementation>(IServiceCollection)

Adds a scoped service of the type specified in TService with an implementation type specified in TImplementation to the specified IServiceCollection.

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

Adds a scoped service of the type specified in TService with a factory specified in implementationFactory to the specified IServiceCollection.

AddScoped<TService>(IServiceCollection)

Adds a scoped service of the type specified in TService to the specified IServiceCollection.

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

Adds a singleton service of the type specified in serviceType with a factory specified in implementationFactory to the specified IServiceCollection.

AddSingleton(IServiceCollection, Type, Object)

Adds a singleton service of the type specified in serviceType with an instance specified in implementationInstance to the specified IServiceCollection.

AddSingleton(IServiceCollection, Type, Type)

Adds a singleton service of the type specified in serviceType with an implementation of the type specified in implementationType to the specified IServiceCollection.

AddSingleton(IServiceCollection, Type)

Adds a singleton service of the type specified in serviceType to the specified IServiceCollection.

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

Adds a singleton service of the type specified in TService with an implementation type specified in TImplementation using the factory specified in implementationFactory to the specified IServiceCollection.

AddSingleton<TService,TImplementation>(IServiceCollection)

Adds a singleton service of the type specified in TService with an implementation type specified in TImplementation to the specified IServiceCollection.

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

Adds a singleton service of the type specified in TService with a factory specified in implementationFactory to the specified IServiceCollection.

AddSingleton<TService>(IServiceCollection, TService)

Adds a singleton service of the type specified in TService with an instance specified in implementationInstance to the specified IServiceCollection.

AddSingleton<TService>(IServiceCollection)

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

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

Adds a transient service of the type specified in serviceType with a factory specified in implementationFactory to the specified IServiceCollection.

AddTransient(IServiceCollection, Type, Type)

Adds a transient service of the type specified in serviceType with an implementation of the type specified in implementationType to the specified IServiceCollection.

AddTransient(IServiceCollection, Type)

Adds a transient service of the type specified in serviceType to the specified IServiceCollection.

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

Adds a transient service of the type specified in TService with an implementation type specified in TImplementation using the factory specified in implementationFactory to the specified IServiceCollection.

AddTransient<TService,TImplementation>(IServiceCollection)

Adds a transient service of the type specified in TService with an implementation type specified in TImplementation to the specified IServiceCollection.

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

Adds a transient service of the type specified in TService with a factory specified in implementationFactory to the specified IServiceCollection.

AddTransient<TService>(IServiceCollection)

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

Applies to