Anarchy.Toolkit.Configuration
2.0.1
dotnet add package Anarchy.Toolkit.Configuration --version 2.0.1
NuGet\Install-Package Anarchy.Toolkit.Configuration -Version 2.0.1
<PackageReference Include="Anarchy.Toolkit.Configuration" Version="2.0.1" />
<PackageVersion Include="Anarchy.Toolkit.Configuration" Version="2.0.1" />
<PackageReference Include="Anarchy.Toolkit.Configuration" />
paket add Anarchy.Toolkit.Configuration --version 2.0.1
#r "nuget: Anarchy.Toolkit.Configuration, 2.0.1"
#:package Anarchy.Toolkit.Configuration@2.0.1
#addin nuget:?package=Anarchy.Toolkit.Configuration&version=2.0.1
#tool nuget:?package=Anarchy.Toolkit.Configuration&version=2.0.1
Anarchy.Toolkit.Configuration
Part of Anarchy I/O Toolkit, a .NET developer platform · Pillar: Infrastructure · Layer: Configuration · Package catalog
Application settings, secrets and provider-neutral telemetry bootstrap for toolkit-based services.
dotnet add package Anarchy.Toolkit.Configuration
- Implement the settings capability interfaces your application needs, then bind and expose them with a
ModuleAppSettingsBase<TAppSettings>subclass. - Use
ModuleLibConfiguration<TAppSettingsDiModule, TAppSettings>to register settings, telemetry, correlation context and secrets together. ModuleTelemetryregisters the toolkit telemetry (AppTelemetry,ICoreTelemetry,IMetricRecorder), the correlation context andIApplicationContext. It adds no sink: logs go to the host's logging providers, and registrations the host made are kept. Pass aModuleTelemetryBase(new ModuleTelemetry(new CompanyTelemetryModule())) to register the company's logging and metrics as a module.- Choose configuration sources in the application, including AWS Systems Manager Parameter Store via
AddAwsSystemsManagerParameterStorewhen needed. Secret services include KMS, cached and in-memory implementations.
When to use it
Use this package at the composition boundary of a service that needs typed settings, secret access and the shared AppTelemetry. Application code owns its settings type, logging providers and configuration sources; the package does not prescribe a configuration file or automatically provision AWS resources.
How to use it
- Define an application settings type implementing
IAppSettingsand whichever capability interfaces the application consumes, such asIAuthServiceAppSettingsorIPostgresAppSettings. - Derive a settings module from
ModuleAppSettingsBase<TAppSettings>. OverrideRegisterAdditionalTypesForSettingsto expose the same settings instance through the capability interfaces your services request. - Register
ModuleLibConfiguration<TAppSettingsDiModule, TAppSettings>usingUseModule. Configure logging providers, a metric recorder or anICoreTelemetryin the host, or pass them as aModuleTelemetryBasethroughnew ModuleLibConfiguration<…>(new ModuleTelemetry(…)). - Choose configuration sources and secret providers in the host. Keep credentials outside committed configuration and grant the AWS permissions needed by any selected remote provider.
The sample API settings module and startup show the wiring end to end.
See the observability guide and toolkit overview.
Releases
See the release notes for the complete release history.
| 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. |
-
net10.0
- Amazon.Extensions.Configuration.SystemsManager (>= 7.1.1)
- Anarchy.Toolkit.Core (>= 2.0.1)
- Anarchy.Toolkit.Core.Telemetry (>= 1.0.1)
- Anarchy.Toolkit.Infrastructure.CorrelationId (>= 2.0.1)
- AWSSDK.Core (>= 4.1.1.2)
- AWSSDK.KeyManagementService (>= 4.1.1.1)
- AWSSDK.SecretsManager (>= 4.1.1.2)
- Humanizer (>= 3.0.10)
- Microsoft.Extensions.Caching.Memory (>= 10.0.15)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.15)
- Microsoft.Extensions.Configuration.Json (>= 10.0.15)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.15)
- Microsoft.Extensions.Diagnostics (>= 10.0.15)
- Microsoft.Extensions.Hosting (>= 10.0.15)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.15)
- Microsoft.Extensions.Logging (>= 10.0.15)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.15)
- Microsoft.Extensions.Options.DataAnnotations (>= 10.0.15)
- Microsoft.Identity.Client (>= 4.92.0)
- Newtonsoft.Json (>= 13.0.4)
NuGet packages (4)
Showing the top 4 NuGet packages that depend on Anarchy.Toolkit.Configuration:
| Package | Downloads |
|---|---|
|
Anarchy.Toolkit.Testing
Shared base test toolkit: TestCaseBase, TestHelper, in-memory test telemetry (log and metric capture), API Gateway response assertions, entity fixtures, and common test extensions. |
|
|
Anarchy.Toolkit.Hosting
Generic startup and entry-point bootstrapping for Jobs and Workers (Lambda and EC2). |
|
|
Anarchy.Toolkit.Testing.Db
Provider-agnostic relational database test helpers (DbTestHelper: enum type handlers and table truncate/clear; DbOptionsMapper) for integration tests. |
|
|
Anarchy.Toolkit.Hosting.Workers
Worker pipeline: monitored/resilient background workers, heartbeat, and a self-hosted health API (service health reports, build metadata) for workers. |
GitHub repositories
This package is not used by any popular GitHub repositories.
## Releases
### 2.0.1
- chore(build): Format package release notes property
### 2.0.0
- Register the provider-neutral telemetry through `ModuleTelemetry`, extensible with a `ModuleTelemetryBase`, and preserve application logging providers.
- Removed the Serilog-based observer bootstrap (`ModuleObservability`, `ObserverFactory`, `ObservabilityOptions`, `ConsoleMeasurer`) and its Serilog enrichers; the structured-exception enricher moved to `Infrastructure.Telemetry.Serilog`.
- `ApplicationContext` and `AmazonRequestContext` moved to the `Anarchy.Toolkit.Configuration.Telemetry` namespace.
- feat(automation): establish onboarding and layering conventions
- feat(telemetry)!: introduce provider-neutral application telemetry
- refactor(packages)!: restructure persistence and automation packages
- refactor(infrastructure.correlationid)!: decouple correlation scopes from Serilog
- refactor(core)!: reshape telemetry, event and health contracts
- refactor(telemetry)!: remove legacy APIs and simplify namespaces
### 1.1.1
- docs(packages): identify each package's pillar and layer
- build(packages): attribute the copyright to Leandro Melão Medeiros
- build: relicense under Apache-2.0 and update the package metadata
### 1.1.0
- build(deps): upgrade Swashbuckle.AspNetCore to 11.0.1 and Microsoft.OpenApi to 3.11.1
### 1.0.7
- docs: expand XML docblocks across all projects for the DocFX API reference
### 1.0.6
- refactor(src): clean up code style across library packages
- chore(deps): update AWS SDK, Lambda ASP.NET Core server and MySqlConnector packages
### 1.0.5
- chore(deps): update AWS SDK packages
### 1.0.3
- build: migrate local automation to build tooling
### 1.0.2
- docs: expand package guides and release histories
- chore(deps): update AWS, Polly, and xUnit packages
### 1.0.1
- Added a package-specific NuGet README.
### 1.0.0
- Introduced application settings, configuration and secret management, observability setup and the AppRunner host helper.