ServiceCollectionServiceExtensions ServiceCollectionServiceExtensions ServiceCollectionServiceExtensions Class

Definition

Extension methods for adding services to an IServiceCollection.

public static class ServiceCollectionServiceExtensions
type ServiceCollectionServiceExtensions = class
Public Module ServiceCollectionServiceExtensions
Inheritance
ServiceCollectionServiceExtensionsServiceCollectionServiceExtensionsServiceCollectionServiceExtensions

Methods

AddScoped(IServiceCollection, Type) AddScoped(IServiceCollection, Type) AddScoped(IServiceCollection, Type)

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

AddScoped(IServiceCollection, Type, Func<IServiceProvider,Object>) AddScoped(IServiceCollection, Type, Func<IServiceProvider,Object>) 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) AddScoped(IServiceCollection, Type, Type) 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<TService,TImplementation>(IServiceCollection) AddScoped<TService,TImplementation>(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,TImplementation>(IServiceCollection, Func<IServiceProvider,TImplementation>) AddScoped<TService,TImplementation>(IServiceCollection, Func<IServiceProvider,TImplementation>) 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>(IServiceCollection) AddScoped<TService>(IServiceCollection) AddScoped<TService>(IServiceCollection)

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

AddScoped<TService>(IServiceCollection, Func<IServiceProvider,TService>) AddScoped<TService>(IServiceCollection, Func<IServiceProvider,TService>) 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.

AddSingleton(IServiceCollection, Type) AddSingleton(IServiceCollection, Type) AddSingleton(IServiceCollection, Type)

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

AddSingleton(IServiceCollection, Type, Func<IServiceProvider,Object>) AddSingleton(IServiceCollection, Type, Func<IServiceProvider,Object>) 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) AddSingleton(IServiceCollection, Type, Object) 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) AddSingleton(IServiceCollection, Type, Type) 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<TService,TImplementation>(IServiceCollection, Func<IServiceProvider,TImplementation>) AddSingleton<TService,TImplementation>(IServiceCollection, Func<IServiceProvider,TImplementation>) 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) AddSingleton<TService,TImplementation>(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) AddSingleton<TService>(IServiceCollection) AddSingleton<TService>(IServiceCollection)

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

AddSingleton<TService>(IServiceCollection, Func<IServiceProvider,TService>) AddSingleton<TService>(IServiceCollection, Func<IServiceProvider,TService>) 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) AddSingleton<TService>(IServiceCollection, TService) AddSingleton<TService>(IServiceCollection, TService)

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

AddTransient(IServiceCollection, Type) AddTransient(IServiceCollection, Type) AddTransient(IServiceCollection, Type)

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

AddTransient(IServiceCollection, Type, Func<IServiceProvider,Object>) AddTransient(IServiceCollection, Type, Func<IServiceProvider,Object>) 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) AddTransient(IServiceCollection, Type, Type) 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<TService,TImplementation>(IServiceCollection) AddTransient<TService,TImplementation>(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,TImplementation>(IServiceCollection, Func<IServiceProvider,TImplementation>) AddTransient<TService,TImplementation>(IServiceCollection, Func<IServiceProvider,TImplementation>) 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>(IServiceCollection) AddTransient<TService>(IServiceCollection) AddTransient<TService>(IServiceCollection)

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

AddTransient<TService>(IServiceCollection, Func<IServiceProvider,TService>) AddTransient<TService>(IServiceCollection, Func<IServiceProvider,TService>) 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.

Applies to