Rystem.DependencyInjection.Web 6.0.24

dotnet add package Rystem.DependencyInjection.Web --version 6.0.24                
NuGet\Install-Package Rystem.DependencyInjection.Web -Version 6.0.24                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Rystem.DependencyInjection.Web" Version="6.0.24" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Rystem.DependencyInjection.Web --version 6.0.24                
#r "nuget: Rystem.DependencyInjection.Web, 6.0.24"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Rystem.DependencyInjection.Web as a Cake Addin
#addin nuget:?package=Rystem.DependencyInjection.Web&version=6.0.24

// Install Rystem.DependencyInjection.Web as a Cake Tool
#tool nuget:?package=Rystem.DependencyInjection.Web&version=6.0.24                

What is Rystem?

Get Started with Runtime Dependency Injection

Adding runtime provider

 builder.Services.AddRuntimeServiceProvider();

and after the build use the runtime provider

var app = builder.Build();
app.UseRuntimeServiceProvider();

Add service at runtime

await RuntimeServiceProvider.GetServiceCollection()
       .AddSingleton<Service2>()
       .RebuildAsync();

Add service at runtime with lock

 await RuntimeServiceProvider
    .AddServicesToServiceCollectionWithLock(configureFurtherServices =>
    {
        configureFurtherServices.AddSingleton(service);
    })
.RebuildAsync();

Add fallback for Factory and automatic rebuild of service collection

In this example Factorized is a simple class with a few parameters.

services.AddFactory<Factorized>("1");
services.AddActionAsFallbackWithServiceCollectionRebuilding<Factorized>(async x =>
{
    //example of retrievieng something
    await Task.Delay(1); 
    //example of ServiceProvider usage during new service addition
    var singletonService = x.ServiceProvider.GetService<SingletonService>();
    if (singletonService != null)
    {
        //example of adding a new service as factory to the service collection. You need to pass a delegate.
        x.ServiceColletionBuilder = (serviceCollection => serviceCollection.AddFactory<Factorized>(x.Name));
    }
});
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Rystem.DependencyInjection.Web:

Package Downloads
Rystem.Test.XUnit

Rystem is a open-source framework to improve the System namespace in .Net

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
6.0.24 84 9/11/2024
6.0.23 175,478 7/18/2024
6.0.21 105 6/18/2024
6.0.20 727,744 6/16/2024
6.0.19 30,344 6/14/2024
6.0.18 89 6/14/2024
6.0.17 87 6/14/2024
6.0.16 49,932 6/10/2024
6.0.15 77 6/10/2024