Soenneker.Config.Realtime
11.0.600
Prefix Reserved
dotnet add package Soenneker.Config.Realtime --version 11.0.600
NuGet\Install-Package Soenneker.Config.Realtime -Version 11.0.600
<PackageReference Include="Soenneker.Config.Realtime" Version="11.0.600" />
<PackageVersion Include="Soenneker.Config.Realtime" Version="11.0.600" />
<PackageReference Include="Soenneker.Config.Realtime" />
paket add Soenneker.Config.Realtime --version 11.0.600
#r "nuget: Soenneker.Config.Realtime, 11.0.600"
#:package Soenneker.Config.Realtime@11.0.600
#addin nuget:?package=Soenneker.Config.Realtime&version=11.0.600
#tool nuget:?package=Soenneker.Config.Realtime&version=11.0.600
Soenneker.Config.Realtime
Adds a process-local, mutable configuration provider whose changes publish standard .NET configuration reload notifications.
Install
dotnet add package Soenneker.Config.Realtime
Register with an application
Add the provider after the configuration sources it should override:
using Soenneker.Config.Realtime.Registrars;
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddRealtimeConfiguration(builder.Configuration);
var app = builder.Build();
This adds one provider to builder.Configuration and registers that same instance as IRealtimeConfigurationProvider.
Outside dependency injection, add the source directly and retain the returned provider:
IRealtimeConfigurationProvider realtime = configurationBuilder.AddRealtimeConfiguration();
IConfigurationRoot configuration = configurationBuilder.Build();
Update values
using Soenneker.Config.Realtime.Abstract;
public sealed class FeatureControl(IRealtimeConfigurationProvider realtime)
{
public void EnableCheckout() => realtime.Set("Features:Checkout", "true");
public void RemoveOverride() => realtime.Remove("Features:Checkout");
}
Keys are case-insensitive and use the normal : hierarchy delimiter. Set publishes a reload only when the effective value in this provider changes. Passing null removes the key. Remove does nothing when the key is absent.
Because this provider is added last in the examples, its values override earlier JSON, environment-variable, and command-line providers. Removing an override may reveal a value from an earlier provider rather than making the composed configuration value null.
Observe changes
Read through IConfiguration for the latest value. For bound options that should react to reload notifications, use IOptionsMonitor<T>:
public sealed class CheckoutWorker(IOptionsMonitor<FeatureOptions> options)
{
public bool IsEnabled => options.CurrentValue.Checkout;
}
Operational notes
- Changes exist only in the current process and are lost on restart. The package does not synchronize instances or persist values.
- Reload callbacks run as part of the configuration notification flow. Keep callbacks short and avoid calling
Setrecursively from them. - Values are stored as strings, matching the .NET configuration model. Binding and validation happen in the consuming configuration or options layer.
- Runtime configuration can contain secrets. Restrict access to the provider and avoid logging values.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net11.0 is compatible. |
-
net11.0
- Microsoft.Extensions.DependencyInjection (>= 11.0.0)
- Soenneker.Extensions.Configuration (>= 11.0.921)
- Soenneker.Extensions.String (>= 11.0.837)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 11.0.600 | 55 | 12/3/2026 |
| 11.0.599 | 54 | 12/3/2026 |
| 11.0.598 | 54 | 12/2/2026 |
| 11.0.596 | 52 | 12/2/2026 |
| 11.0.595 | 58 | 12/2/2026 |
| 11.0.594 | 53 | 12/2/2026 |
| 11.0.593 | 77 | 12/2/2026 |
| 11.0.592 | 91 | 12/1/2026 |
| 11.0.591 | 89 | 12/1/2026 |
| 11.0.590 | 91 | 12/1/2026 |
| 11.0.589 | 96 | 11/30/2026 |
| 11.0.588 | 95 | 11/30/2026 |
| 11.0.587 | 97 | 11/30/2026 |
| 11.0.586 | 91 | 11/29/2026 |
| 11.0.585 | 110 | 11/18/2026 |
| 11.0.583 | 104 | 11/18/2026 |
| 11.0.582 | 104 | 11/18/2026 |
| 11.0.581 | 96 | 11/18/2026 |
| 11.0.580 | 110 | 11/15/2026 |
| 11.0.579 | 100 | 11/11/2026 |
Update dependency Soenneker.Extensions.String to 11.0.837 (#1224)