CasCap.Common.Configuration.Runtime
5.2.1
Prefix Reserved
dotnet add package CasCap.Common.Configuration.Runtime --version 5.2.1
NuGet\Install-Package CasCap.Common.Configuration.Runtime -Version 5.2.1
<PackageReference Include="CasCap.Common.Configuration.Runtime" Version="5.2.1" />
<PackageVersion Include="CasCap.Common.Configuration.Runtime" Version="5.2.1" />
<PackageReference Include="CasCap.Common.Configuration.Runtime" />
paket add CasCap.Common.Configuration.Runtime --version 5.2.1
#r "nuget: CasCap.Common.Configuration.Runtime, 5.2.1"
#:package CasCap.Common.Configuration.Runtime@5.2.1
#addin nuget:?package=CasCap.Common.Configuration.Runtime&version=5.2.1
#tool nuget:?package=CasCap.Common.Configuration.Runtime&version=5.2.1
CasCap.Common.Configuration.Runtime
.NET 10/11 typed runtime configuration support. It uses the standard
configuration-provider and complete dictionary-replacement approach, with validation before reload,
an isolated root and the standard IOptionsMonitor<T>. It is not a custom monitor implementation.
Installation
dotnet add package CasCap.Common.Configuration.Runtime
Add a durable provider package for PostgreSQL or SQLite; this package defines the runtime contract, not a database authority.
Generated Metadata and Native AOT
AddRuntimeConfiguration also accepts generated JsonTypeInfo<T> and a required
IValidateOptions<T> validator covering the complete DTO graph. That path avoids reflective JSON
and DataAnnotations while retaining byte/depth limits, strict shape checks and registered validators.
The existing overload retains its managed validation behavior and now explicitly declares its
trimming/dynamic-code requirements.
See the source-build AOT pilot for usage, published JIT/native integration checks and the separate EF/provider limitations. This is not a production AOT or prebuilt NuGet compatibility promise.
Contract
Register one DTO per host through AddRuntimeConfiguration<T> and supply an
IRuntimeConfigurationStore<T> implementation. A complete initial durable revision is required:
missing data or unavailable storage fails startup. Expired revisions return to the supplied startup
baseline. Each newly activated revision logs one Information line with its revision number, and
an accepted revision that expires logs once when the baseline is restored. Invalid refreshes retain
the previous accepted snapshot: the first failure logs one sanitized Error, repeats log at
Debug, and the next successful refresh logs one Information recovery with the failure count and
duration.
Consumers must not mutate returned options; capture one aggregate per operation.
Durable adapters also expose IRuntimeConfigurationPublisher<T>
for typed expected-revision publication and authoritative reads. Optional caching decorates only
the reader contract, never this publisher.
Expiry of an already accepted override is checked locally before polling and after failed refreshes; a newer invalid durable revision cannot extend that override indefinitely. Scheduling and in-flight store operations can delay reconciliation, so expiry is not a hard real-time safety deadline.
The initial slice supports one contract, complete snapshots, direct polling and .NET 10/11. It does not merge arbitrary deployment overrides, implement cross-contract atomicity or promise rollback of failing application callbacks. Deployment settings and credentials stay immutable. Register runtime configuration before consumers' hosted services.
No network access occurs during ordinary options reads. Polling currently reads one complete bounded snapshot per interval; revision-only optimization is deferred until measured load warrants it. See the consumer and operations guide, PostgreSQL adapter, SQLite adapter, optional cache-aside trial and design.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. net11.0 is compatible. |
-
net10.0
- Microsoft.Extensions.Configuration.Json (>= 10.0.14)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.14)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.14)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.14)
- Microsoft.Extensions.Options.DataAnnotations (>= 10.0.14)
-
net11.0
- Microsoft.Extensions.Configuration.Json (>= 11.0.0)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 11.0.0)
- Microsoft.Extensions.Options.DataAnnotations (>= 11.0.0)
NuGet packages (4)
Showing the top 4 NuGet packages that depend on CasCap.Common.Configuration.Runtime:
| Package | Downloads |
|---|---|
|
CasCap.Common.Configuration.PostgreSql
EF Core PostgreSQL authority for typed, audited runtime configuration. |
|
|
CasCap.Common.Configuration.Management
Optional authorized typed runtime configuration management controllers. |
|
|
CasCap.Common.Configuration.Redis
Optional bounded cache-aside acceleration for typed runtime configuration. |
|
|
CasCap.Common.Configuration.Sqlite
EF Core SQLite authority for typed, audited runtime configuration. |
GitHub repositories
This package is not used by any popular GitHub repositories.