Microsoft.Extensions.DependencyInjection Namespace
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.
Provides classes that support the implementation of the dependency injection software design pattern.
Classes
ActivatorUtilities |
Helper code for the various activator services. |
ActivatorUtilitiesConstructorAttribute |
Marks the constructor to be used when activating type using ActivatorUtilities. |
DefaultServiceProviderFactory |
Default implementation of IServiceProviderFactory<TContainerBuilder>. |
EncoderServiceCollectionExtensions |
Extension methods for setting up web encoding services in an IServiceCollection. |
EntityFrameworkCoreHealthChecksBuilderExtensions | |
HealthChecksBuilderAddCheckExtensions |
Provides basic extension methods for registering IHealthCheck instances in an IHealthChecksBuilder. |
HealthChecksBuilderDelegateExtensions |
Provides extension methods for registering delegates with the IHealthChecksBuilder. |
HealthCheckServiceCollectionExtensions |
Provides extension methods for registering HealthCheckService in an IServiceCollection. |
HttpClientBuilderExtensions |
Extension methods for configuring an IHttpClientBuilder. |
HttpClientFactoryServiceCollectionExtensions |
Extensions methods to configure an IServiceCollection for IHttpClientFactory. |
LocalizationServiceCollectionExtensions |
Extension methods for setting up localization services in an IServiceCollection. |
LoggingServiceCollectionExtensions |
Extension methods for setting up logging services in an IServiceCollection. |
MemoryCacheServiceCollectionExtensions |
Extension methods for setting up memory cache related services in an IServiceCollection. |
OptionsBuilderConfigurationExtensions |
Extension methods for adding configuration related options services to the DI container via OptionsBuilder<TOptions>. |
OptionsBuilderDataAnnotationsExtensions |
Extension methods for adding configuration-related options services to the DI container via OptionsBuilder<TOptions>. |
OptionsBuilderExtensions |
Extension methods for adding configuration related options services to the DI container via OptionsBuilder<TOptions>. |
OptionsConfigurationServiceCollectionExtensions |
Extension methods for adding configuration related options services to the DI container. |
OptionsServiceCollectionExtensions |
Extension methods for adding options services to the DI container. |
PollyHttpClientBuilderExtensions |
Extensions methods for configuring PolicyHttpMessageHandler message handlers as part of and HttpClient message handler pipeline. |
PollyServiceCollectionExtensions |
Provides convenience extension methods to register IPolicyRegistry<TKey> and IReadOnlyPolicyRegistry<TKey> in the service collection. |
RedisCacheServiceCollectionExtensions |
Extension methods for setting up Redis distributed cache related services in an IServiceCollection. |
ServiceCollection |
Default implementation of IServiceCollection. |
ServiceCollectionContainerBuilderExtensions |
Extension methods for building a ServiceProvider from an IServiceCollection. |
ServiceCollectionHostedServiceExtensions | |
ServiceCollectionServiceExtensions |
Extension methods for adding services to an IServiceCollection. |
ServiceDescriptor |
Describes a service with its service type, implementation, and lifetime. |
ServiceProvider |
The default IServiceProvider. |
ServiceProviderOptions |
Options for configuring various behaviors of the default IServiceProvider implementation. |
ServiceProviderServiceExtensions |
Extension methods for getting services from an IServiceProvider. |
SqlServerCachingServicesExtensions |
Extension methods for setting up Microsoft SQL Server distributed cache services in an IServiceCollection. |
StackExchangeRedisCacheServiceCollectionExtensions |
Extension methods for setting up Redis distributed cache related services in an IServiceCollection. |
Structs
AsyncServiceScope |
A IServiceScope implementation that implements IAsyncDisposable. |
Interfaces
IHealthChecksBuilder |
A builder used to register health checks. |
IHttpClientBuilder |
A builder for configuring named HttpClient instances returned by IHttpClientFactory. |
IServiceCollection |
Specifies the contract for a collection of service descriptors. |
IServiceProviderFactory<TContainerBuilder> |
Provides an extension point for creating a container specific builder and an IServiceProvider. |
IServiceProviderIsService |
Optional service used to determine if the specified type is available from the IServiceProvider. |
IServiceScope |
The Dispose() method ends the scope lifetime. Once Dispose is called, any scoped services that have been resolved from ServiceProvider will be disposed. |
IServiceScopeFactory |
A factory for creating instances of IServiceScope, which is used to create services within a scope. |
ISupportRequiredService |
Optional contract used by GetRequiredService<T>(IServiceProvider) to resolve services if supported by IServiceProvider. |
Enums
ServiceLifetime |
Specifies the lifetime of a service in an IServiceCollection. |
Delegates
ObjectFactory |
The result of CreateFactory(Type, Type[]). |
ObjectFactory<T> |