Microsoft.Extensions.DependencyInjection 10.0.0-preview.6.25358.103
About
Supports the dependency injection (DI) software design pattern which is a technique for achieving Inversion of Control (IoC) between classes and their dependencies.
Key Features
Provides an implementation of the DI interfaces found in the Microsoft.Extensions.DependencyInjection.Abstractions package.
How to Use
ServiceCollection services = new ();
services.AddSingleton<IMessageWriter, MessageWriter>();
using ServiceProvider provider = services.BuildServiceProvider();
// The code below, following the IoC pattern, is typically only aware of the IMessageWriter interface, not the implementation.
IMessageWriter messageWriter = provider.GetService<IMessageWriter>()!;
messageWriter.Write("Hello");
public interface IMessageWriter
{
void Write(string message);
}
internal class MessageWriter : IMessageWriter
{
public void Write(string message)
{
Console.WriteLine($"MessageWriter.Write(message: \"{message}\")");
}
}
Main Types
The main types provided by this library are:
Microsoft.Extensions.DependencyInjection.DefaultServiceProviderFactoryMicrosoft.Extensions.DependencyInjection.ServiceCollectionContainerBuilderExtensionsMicrosoft.Extensions.DependencyInjection.ServiceProvider
Additional Documentation
- Conceptual documentation
- API documentation
Related Packages
Microsoft.Extensions.DependencyInjection.AbstractionsMicrosoft.Extensions.HostingMicrosoft.Extensions.Options
Feedback & Contributing
Microsoft.Extensions.DependencyInjection is released as open source under the MIT license. Bug reports and contributions are welcome at the GitHub repository.
Showing the top 20 packages that depend on Microsoft.Extensions.DependencyInjection.
| Packages | Downloads |
|---|---|
|
Senparc.CO2NET
Senparc.CO2NET 公共基础库
Senparc.Weixin SDK 开源项目:
https://github.com/Senparc/Senparc.CO2NET
|
38 |
|
Senparc.CO2NET
Senparc.CO2NET 公共基础库
Senparc.Weixin SDK 开源项目:
https://github.com/Senparc/Senparc.CO2NET
|
35 |
|
Microsoft.AspNetCore.Components.Web
Support for rendering ASP.NET Core components for browsers.
This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/6a6d775f49623bbd742c02f89d373630668547bb
|
32 |
|
Microsoft.VisualStudio.Web.CodeGeneration.Core
Contains the core infrastructure used by ASP.NET Core Code Generators.
|
30 |
|
Microsoft.AspNetCore.Mvc
ASP.NET Core MVC is a web framework that gives you a powerful, patterns-based way to build dynamic websites and web APIs. ASP.NET Core MVC enables a clean separation of concerns and gives you full control over markup.
|
27 |
|
Microsoft.Identity.Web.TokenCache
This package bring token cache serializers for MSAL.NET confidential client applications.
|
25 |
|
Microsoft.AspNetCore.DataProtection.Extensions
Additional APIs for ASP.NET Core data protection.
|
23 |
|
Microsoft.AspNetCore.Components.Web
Support for rendering ASP.NET Core components for browsers.
This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/c70204ae3c91d2b48fa6d9b92b62265f368421b4
|
23 |
|
Microsoft.AspNetCore.DataProtection.Extensions
Additional APIs for ASP.NET Core data protection.
This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/e1ad9117a4dac3b0f5f2a7e2b10b43b7016379b9
|
21 |
|
DotNetCore.CAP
EventBus and eventually consistency in distributed architectures.
|
21 |
|
Microsoft.Extensions.Logging
Logging infrastructure default implementation for Microsoft.Extensions.Logging.
|
20 |
|
Microsoft.AspNetCore.Mvc.Core
ASP.NET Core MVC core components. Contains common action result types, attribute routing, application model conventions, API explorer, application parts, filters, formatters, model binding, and more.
Commonly used types:
Microsoft.AspNetCore.Mvc.AreaAttribute
Microsoft.AspNetCore.Mvc.BindAttribute
Microsoft.AspNetCore.Mvc.ControllerBase
Microsoft.AspNetCore.Mvc.FromBodyAttribute
Microsoft.AspNetCore.Mvc.FromFormAttribute
Microsoft.AspNetCore.Mvc.RequireHttpsAttribute
Microsoft.AspNetCore.Mvc.RouteAttribute
|
20 |
|
Microsoft.Identity.Web.TokenCache
This package bring token cache serializers for MSAL.NET confidential client applications.
|
20 |
|
Microsoft.VisualStudio.Web.CodeGeneration
Contains the CodeGenCommand that finds the appropriate code generator and invokes it from project dependencies.
|
20 |
|
Dapr.Client
This package contains the reference assemblies for developing services using Dapr.
|
20 |
|
Microsoft.AspNetCore.App
Provides a default set of APIs for building an ASP.NET Core application.
This package requires the ASP.NET Core runtime. This runtime is installed by the .NET Core SDK, or can be acquired separately using installers available at https://aka.ms/dotnet-download.
|
19 |
|
AspectCore.Extensions.DependencyInjection
Interceptor and dynamicProxy support for Microsoft.Extensions.DependencyInjection via AspectCore Framework.
|
19 |
|
Microsoft.ServiceFabric.AspNetCore.Abstractions
This package provides abstractions for creating AspNetCore Service Fabric microservices.
|
19 |
|
Microsoft.AspNetCore.DataProtection.Extensions
Additional APIs for ASP.NET Core data protection.
This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/8486d31e24f30e3fa1809a95699a0adc16f448d7
|
19 |
https://go.microsoft.com/fwlink/?LinkID=799421
.NET Framework 4.6.2
- Microsoft.Bcl.AsyncInterfaces (>= 10.0.0-preview.6.25358.103)
- System.Threading.Tasks.Extensions (>= 4.6.3)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.0-preview.6.25358.103)
.NET Standard 2.1
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.0-preview.6.25358.103)
.NET Standard 2.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.0-preview.6.25358.103)
- Microsoft.Bcl.AsyncInterfaces (>= 10.0.0-preview.6.25358.103)
- System.Threading.Tasks.Extensions (>= 4.6.3)
.NET 10.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.0-preview.6.25358.103)
.NET 8.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.0-preview.6.25358.103)
.NET 9.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.0-preview.6.25358.103)