Futurum.Microsoft.Extensions.DependencyInjection
1.0.4
See the version list below for details.
dotnet add package Futurum.Microsoft.Extensions.DependencyInjection --version 1.0.4
NuGet\Install-Package Futurum.Microsoft.Extensions.DependencyInjection -Version 1.0.4
<PackageReference Include="Futurum.Microsoft.Extensions.DependencyInjection" Version="1.0.4" />
paket add Futurum.Microsoft.Extensions.DependencyInjection --version 1.0.4
#r "nuget: Futurum.Microsoft.Extensions.DependencyInjection, 1.0.4"
// Install Futurum.Microsoft.Extensions.DependencyInjection as a Cake Addin #addin nuget:?package=Futurum.Microsoft.Extensions.DependencyInjection&version=1.0.4 // Install Futurum.Microsoft.Extensions.DependencyInjection as a Cake Tool #tool nuget:?package=Futurum.Microsoft.Extensions.DependencyInjection&version=1.0.4
Futurum.Microsoft.Extensions.DependencyInjection
A dotnet library, that allows Microsoft.Extensions.DependencyInjection to work with Futurum.Core. It also adds support for modules and startables.
TryGetService
Try to get the service object of the specified type.
var result = serviceProvider.TryGetService<ITestService>();
Modules
A module allows you to break up registration into logical units.
IModule interface
Implements this interface to create a module.
public class TestModule : IModule
{
public void Load(IServiceCollection services)
{
services.AddSingleton<ITestService, TestService>();
}
}
RegisterModule extension method
Allows you to register a module.
services.RegisterModule<TestModule>();
services.RegisterModule(new TestModule());
Startables
A startable is resolved at the start of the application lifecycle and is a place to perform actions as soon as the DependencyInjection container is built.
IStartable interface
Implements this interface to create a startable.
public class TestStartable : IStartable
{
public void Start()
{
// Do something
}
}
AddStartable extension method
Allows you to register a startable.
services.AddStartable<TestStartable>();
services.AddStartable(new TestStartable());
BuildServiceProviderWithStartables extension method
Creates a ServiceProvider containing services from the provided IServiceCollection and starts all IStartable instances.
var serviceProvider = services.BuildServiceProviderWithStartables();
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net6.0
- Futurum.Core (>= 1.0.15)
- Microsoft.Extensions.DependencyInjection (>= 6.0.0)
- Microsoft.Extensions.Hosting.Abstractions (>= 6.0.0)
NuGet packages (5)
Showing the top 5 NuGet packages that depend on Futurum.Microsoft.Extensions.DependencyInjection:
Package | Downloads |
---|---|
Futurum.WebApiEndpoint
A dotnet library that allows you to build WebApiEndpoints using a vertical slice architecture approach. Provides a structured way to create REST apis in dotnet without controllers. |
|
Futurum.ApiEndpoint
A dotnet library, that is the base for ApiEndpoints in Futurum. |
|
Futurum.WebApiEndpoint.Micro
A dotnet library that allows you to build WebApiEndpoints using a vertical slice architecture approach. Built on dotnet 8 and minimal apis. |
|
Futurum.Core.Polly
Small dotnet library, allowing you to use [Polly](https://github.com/App-vNext/Polly) with Futurum.Core, based on the concepts behind 'Railway Oriented Programming'. |
|
Futurum.WebApiEndpoint.Micro.Core.Extensions
A dotnet library that extends Futurum.WebApiEndpoint.Micro, to make it fully compatible with Futurum.Core. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
2.0.1 | 245 | 12/24/2023 |
2.0.0 | 336 | 12/5/2023 |
1.0.11 | 233 | 4/21/2023 |
1.0.10 | 194 | 4/20/2023 |
1.0.9 | 189 | 4/19/2023 |
1.0.8 | 190 | 4/19/2023 |
1.0.7 | 208 | 4/17/2023 |
1.0.6 | 185 | 4/17/2023 |
1.0.5 | 188 | 4/16/2023 |
1.0.4 | 210 | 4/7/2023 |
1.0.3 | 1,225 | 6/3/2022 |
1.0.2 | 2,308 | 2/6/2022 |
1.0.1 | 651 | 2/5/2022 |
1.0.0 | 927 | 1/28/2022 |