Rystem.DependencyInjection.Web 6.0.23

There is a newer version of this package available.
See the version list below for details.
dotnet add package Rystem.DependencyInjection.Web --version 6.0.23                
NuGet\Install-Package Rystem.DependencyInjection.Web -Version 6.0.23                
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.23" />                
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.23                
#r "nuget: Rystem.DependencyInjection.Web, 6.0.23"                
#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.23

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

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
9.0.0 73,641 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