Zwedze.Aetherweave.Core
0.2.5
dotnet add package Zwedze.Aetherweave.Core --version 0.2.5
NuGet\Install-Package Zwedze.Aetherweave.Core -Version 0.2.5
<PackageReference Include="Zwedze.Aetherweave.Core" Version="0.2.5" />
<PackageVersion Include="Zwedze.Aetherweave.Core" Version="0.2.5" />
<PackageReference Include="Zwedze.Aetherweave.Core" />
paket add Zwedze.Aetherweave.Core --version 0.2.5
#r "nuget: Zwedze.Aetherweave.Core, 0.2.5"
#:package Zwedze.Aetherweave.Core@0.2.5
#addin nuget:?package=Zwedze.Aetherweave.Core&version=0.2.5
#tool nuget:?package=Zwedze.Aetherweave.Core&version=0.2.5
Aetherweave.Core
Shared resources used by other Aetherweave packages — configuration binding with startup validation, and the exceptions that go with it.
Features
- Configuration Binding - Bind and validate strongly-typed options from
IConfiguration - Startup Validation - Invalid configuration fails fast via
ValidateOnStart() - Data Annotations Support - Use standard
[Required],[Range], etc. on your options classes - Named Options - Bind multiple sections to the same options type
- Descriptive Exceptions - Clear errors when a section is missing or fails validation
Installation
dotnet add package Zwedze.Aetherweave.Core
Quick Start
1. Register options at startup
Binds a configuration section to TOptions, validates data annotations, and re-validates on every access via IOptions<TOptions>. Throws ConfigurationNotFoundException immediately if the section doesn't exist.
public sealed record JwtBearerOptions
{
[Required(AllowEmptyStrings = false)] public required string Authority { get; init; }
[Required(AllowEmptyStrings = false)] public required string Audience { get; init; }
}
ConfigurationLoader.RegisterOptions<JwtBearerOptions>(
services,
configuration,
"Aetherweave:Security:JwtBearer");
Named options - bind several sibling sections (e.g. one per named HttpClient) to the same type:
var sections = configuration.GetSection("Aetherweave:HttpClients").GetChildren();
ConfigurationLoader.RegisterOptions<HttpClientOptions>(services, sections);
2. Read options eagerly
Use GetOptions<T> when you need the bound and validated value immediately (e.g. inside another extension method that configures a third-party library), rather than through DI's IOptions<T>.
var options = ConfigurationLoader.GetOptions<JwtBearerOptions>(
configuration,
"Aetherweave:Security:JwtBearer");
Throws ConfigurationInvalidException if any data annotation fails, with all validation errors joined into the message.
3. Exceptions
| Type | When |
|---|---|
ConfigurationNotFoundException |
The requested section does not exist in IConfiguration |
ConfigurationInvalidException |
The bound options object fails data annotation validation |
try
{
var options = ConfigurationLoader.GetOptions<JwtBearerOptions>(configuration, "Aetherweave:Security:JwtBearer");
}
catch (ConfigurationNotFoundException ex)
{
// "Configuration section 'Aetherweave:Security:JwtBearer' not found. Ensure your appsettings contains the required configuration."
}
catch (ConfigurationInvalidException ex)
{
// "Configuration section 'Aetherweave:Security:JwtBearer' is invalid. Errors: ..."
}
API Reference
| Member | Signature |
|---|---|
ConfigurationLoader.RegisterOptions<T> |
(IServiceCollection, IConfiguration, string sectionName, string? optionName = null) — DI-based, validated on start |
ConfigurationLoader.RegisterOptions<T> |
(IServiceCollection, IEnumerable<IConfigurationSection>) — one named option per section |
ConfigurationLoader.GetOptions<T> |
(IConfiguration, string sectionName) → T — bound and validated immediately |
| 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
- JetBrains.Annotations (>= 2026.2.0)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.10)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.10)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.10)
- Microsoft.Extensions.Options.DataAnnotations (>= 10.0.10)
NuGet packages (6)
Showing the top 5 NuGet packages that depend on Zwedze.Aetherweave.Core:
| Package | Downloads |
|---|---|
|
Zwedze.Aetherweave.Http
Type-safe HttpClient configuration for Aetherweave, featuring built-in profiling, content tracing, and centralized error handling middleware. |
|
|
Zwedze.Aetherweave.Data.Relational
EF Core implementation of the Aetherweave data abstractions, providing transactional Unit of Work management, auto-configuration, and built-in health checks for relational databases. |
|
|
Zwedze.Aetherweave.Security.Jwt
Manage JWT integration for api security. |
|
|
Zwedze.Aetherweave.Security.Oidc
Manage OIDC integration for api security. |
|
|
Zwedze.Aetherweave.Security.ClientCredentials
Backend-to-backend OAuth2 client-credentials authentication for Aetherweave typed HttpClients. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.2.5 | 147 | 9/3/2026 |
| 0.2.5-pre.2 | 94 | 9/3/2026 |
| 0.2.5-pre.1 | 102 | 8/13/2026 |
| 0.2.5-extend-db-registratio... | 85 | 8/31/2026 |
| 0.2.4 | 161 | 8/13/2026 |
| 0.2.4-pre.1 | 89 | 8/13/2026 |
| 0.2.3 | 148 | 8/6/2026 |
| 0.2.3-pre.1 | 99 | 8/6/2026 |
| 0.2.2 | 166 | 8/5/2026 |
| 0.2.2-pre.1 | 94 | 7/30/2026 |
| 0.2.1 | 154 | 7/29/2026 |
| 0.2.1-pre.1 | 92 | 7/29/2026 |
| 0.2.0 | 151 | 7/25/2026 |
| 0.1.2-pre.3 | 92 | 7/25/2026 |
| 0.1.2-pre.1 | 78 | 7/24/2026 |