Microsoft.Extensions.DependencyInjection 10.0.0-rc.1.25451.107
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.DefaultServiceProviderFactory
Microsoft.Extensions.DependencyInjection.ServiceCollectionContainerBuilderExtensions
Microsoft.Extensions.DependencyInjection.ServiceProvider
Additional Documentation
- Conceptual documentation
- API documentation
Related Packages
Microsoft.Extensions.DependencyInjection.Abstractions
Microsoft.Extensions.Hosting
Microsoft.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 |
---|---|
Microsoft.VisualStudio.Web.CodeGeneration
Contains the CodeGenCommand that finds the appropriate code generator and invokes it from project dependencies.
This package was built from the source code at https://github.com/aspnet/scaffolding/tree/458fd60d0885d8e7933b40d1386bf21f1a0f2590
|
16 |
Volo.Abp.Core
Package Description
|
14 |
Serilog.AspNetCore
Serilog support for ASP.NET Core logging
|
14 |
Microsoft.AspNetCore.Mvc.Localization
ASP.NET Core MVC features that enable globalization and localization of applications.
Commonly used types:
Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizer<TResource>
Microsoft.AspNetCore.Mvc.Localization.IViewLocalizer
|
14 |
FreeSql.DbContext
FreeSql is the ORM in .NetCore, .NetFramework, And Xamarin. It supports Mysql, Postgresql, SqlServer, Oracle, Sqlite, Firebird, Clickhouse, DuckDB, TDengine, QuestDB, Odbc, Oledb, 达梦, 人大金仓, 南大通用, 虚谷, 神舟通用, 翰高, And Access
|
14 |
Serilog.AspNetCore
Serilog support for ASP.NET Core logging
|
13 |
Microsoft.AspNetCore.SignalR.Client.Core
Client for ASP.NET Core SignalR
This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/5ae8106f83d4d23cd0a2d2474c1b15e4d5dfc9eb
|
13 |
learun.utils
力软敏捷框架util通用方法
|
13 |
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/d9ba962869d1b1c410ea476b02de2f8e27eec762
|
13 |
FreeSql.DbContext
FreeSql is the ORM in .NetCore, .NetFramework, And Xamarin. It supports Mysql, Postgresql, SqlServer, Oracle, Sqlite, Odbc, 达梦, And Access
|
13 |
Microsoft.VisualStudio.Web.CodeGeneration
Contains the CodeGenCommand that finds the appropriate code generator and invokes it from project dependencies.
|
13 |
Microsoft.AspNetCore.SignalR.Client.Core
Client for ASP.NET Core SignalR
This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/b7a2ec8c7ed6b48857af0a69688a73e8c14fe6cb
|
12 |
Microsoft.AspNetCore.DataProtection.Extensions
Additional APIs for ASP.NET Core data protection.
This package was built from the source code at https://github.com/aspnet/AspNetCore/tree/e81033e094d4663ffd227bb4aed30b76b0631e6d
|
12 |
Microsoft.AspNetCore.Hosting
ASP.NET Core hosting infrastructure and startup logic for web applications.
|
11 |
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/31d685b2d9a86ca1243014d175a3da813f78e428
|
11 |
Microsoft.AspNetCore.SignalR.Client.Core
Client for ASP.NET Core SignalR
This package was built from the source code at https://github.com/aspnet/AspNetCore/tree/1f050242559e7b90ff6c4ee7f99d92b3a5af5a62
|
11 |
Serilog.AspNetCore
Serilog support for ASP.NET Core logging
|
11 |
https://go.microsoft.com/fwlink/?LinkID=799421
.NET Framework 4.6.2
- Microsoft.Bcl.AsyncInterfaces (>= 10.0.0-rc.1.25451.107)
- System.Threading.Tasks.Extensions (>= 4.6.3)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.0-rc.1.25451.107)
.NET Standard 2.1
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.0-rc.1.25451.107)
.NET Standard 2.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.0-rc.1.25451.107)
- Microsoft.Bcl.AsyncInterfaces (>= 10.0.0-rc.1.25451.107)
- System.Threading.Tasks.Extensions (>= 4.6.3)
.NET 10.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.0-rc.1.25451.107)
.NET 8.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.0-rc.1.25451.107)
.NET 9.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.0-rc.1.25451.107)