Rystem.DependencyInjection.Web 9.0.0

dotnet add package Rystem.DependencyInjection.Web --version 9.0.0                
NuGet\Install-Package Rystem.DependencyInjection.Web -Version 9.0.0                
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="9.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Rystem.DependencyInjection.Web --version 9.0.0                
#r "nuget: Rystem.DependencyInjection.Web, 9.0.0"                
#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=9.0.0

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

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 net9.0 is compatible. 
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
9.0.0 56,983 11/16/2024
9.0.0-rc.1 79 10/18/2024
6.2.0 218,934 10/9/2024
6.1.1 93 10/9/2024
6.1.0 47,841 9/29/2024
6.0.24 129 9/11/2024
6.0.23 340,055 7/18/2024
6.0.21 127 6/18/2024
6.0.20 727,768 6/16/2024
6.0.19 30,366 6/14/2024
6.0.18 115 6/14/2024
6.0.17 111 6/14/2024
6.0.16 49,953 6/10/2024
6.0.15 92 6/10/2024