Microsoft.Extensions.DependencyInjection 10.0.0-rc.2.25502.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.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 |
|---|---|
|
Microsoft.EntityFrameworkCore
Entity Framework Core is a lightweight and extensible version of the popular Entity Framework data access technology.
Commonly Used Types:
Microsoft.EntityFrameworkCore.DbContext
Microsoft.EntityFrameworkCore.DbSet
|
3 |
|
Microsoft.Extensions.Logging
Logging infrastructure default implementation for Microsoft.Extensions.Logging.
|
3 |
|
Microsoft.Extensions.Logging
Logging infrastructure default implementation for Microsoft.Extensions.Logging.
|
2 |
|
Microsoft.Orleans.Core
Core library of Microsoft Orleans used both on the client and server.
|
2 |
|
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/64ea4108e7dcf1ca575f8dd2028363b0b1ef6ebc
|
2 |
|
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/f6897a5bb7ca767df8eb465bf15b193c878fffbf
|
2 |
|
Serilog.AspNetCore
Serilog support for ASP.NET Core logging
|
2 |
|
Microsoft.AspNetCore.All
Provides a default set of APIs for building an ASP.NET Core application, and also includes API for third-party integrations with ASP.NET Core.
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.
|
1 |
|
Microsoft.Extensions.Logging
Logging infrastructure default implementation for Microsoft.Extensions.Logging.
|
1 |
|
Microsoft.Maui.Core
.NET Multi-platform App UI (.NET MAUI) is a cross-platform framework for creating native mobile and desktop apps with C# and XAML. This package only contains the core objects used by .NET MAUI. Please install the Microsoft.Maui.Controls package to start using .NET MAUI.
|
1 |
|
Microsoft.Orleans.Clustering.AzureStorage
Microsoft Orleans clustering provider backed by Azure Table Storage
|
1 |
|
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/aspnet/AspNetCore/tree/49e84ee5ff04b17f35cacb9c1d6ccf52d8328dad
|
1 |
|
Microsoft.CodeAnalysis.Workspaces.MSBuild
.NET Compiler Platform ("Roslyn") support for analyzing MSBuild projects and solutions. This should be used with at least one
of the following packages to add the appropriate language support:
- Microsoft.CodeAnalysis.CSharp.Workspaces
- Microsoft.CodeAnalysis.VisualBasic.Workspaces
More details at https://aka.ms/roslyn-packages
This package was built from the source at https://github.com/dotnet/roslyn/commit/e68227ea677b76a3c603bd616f03ea6d952b2458.
|
1 |
|
Microsoft.Extensions.Logging
Logging infrastructure default implementation for Microsoft.Extensions.Logging.
When using NuGet 3.x this package requires at least version 3.4.
|
1 |
|
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
|
1 |
|
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/d0ca5a8d20ac50a33d5451e998a5d411a810c8d7
|
1 |
|
Microsoft.Extensions.Hosting
Hosting and startup infrastructures for applications.
When using NuGet 3.x this package requires at least version 3.4.
|
1 |
|
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/0621c1748eac08dd516edc950559ab7e8308f214
|
1 |
.NET Framework 4.6.2
- Microsoft.Bcl.AsyncInterfaces (>= 10.0.0-rc.2.25502.107)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.0-rc.2.25502.107)
- System.Threading.Tasks.Extensions (>= 4.6.3)
.NET 8.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.0-rc.2.25502.107)
.NET 9.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.0-rc.2.25502.107)
.NET 10.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.0-rc.2.25502.107)
.NET Standard 2.0
- Microsoft.Bcl.AsyncInterfaces (>= 10.0.0-rc.2.25502.107)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.0-rc.2.25502.107)
- System.Threading.Tasks.Extensions (>= 4.6.3)
.NET Standard 2.1
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.0-rc.2.25502.107)