Abblix.DependencyInjection
2.4.0
Prefix Reserved
dotnet add package Abblix.DependencyInjection --version 2.4.0
NuGet\Install-Package Abblix.DependencyInjection -Version 2.4.0
<PackageReference Include="Abblix.DependencyInjection" Version="2.4.0" />
<PackageVersion Include="Abblix.DependencyInjection" Version="2.4.0" />
<PackageReference Include="Abblix.DependencyInjection" />
paket add Abblix.DependencyInjection --version 2.4.0
#r "nuget: Abblix.DependencyInjection, 2.4.0"
#:package Abblix.DependencyInjection@2.4.0
#addin nuget:?package=Abblix.DependencyInjection&version=2.4.0
#tool nuget:?package=Abblix.DependencyInjection&version=2.4.0
Abblix.DependencyInjection
Extensions over Microsoft.Extensions.DependencyInjection for the patterns a modular library actually needs: aliasing one registration under several contracts, composing many implementations into one pipeline and editing that pipeline afterwards, decorating registered services, and constructing services with per-call overrides. This is the DI layer behind Abblix OIDC Server, usable on its own in any .NET application.
Advanced DI in .NET is the long form: the same ladder from aliases to an editable pipeline, with the reasoning behind each rung and what it costs.
Install
dotnet add package Abblix.DependencyInjection
Aliasing
One implementation, several contracts, one instance:
services.AddSingleton<TokenService>();
services.AddAlias<ITokenIssuer, TokenService>();
services.AddAlias<ITokenRevoker, TokenService>();
TryAddAlias and TryAddEnumerableAlias follow the framework's TryAdd semantics, so a host's own registration wins over a library default.
AddKeyedAlias<TService, TSource>(serviceKey, sourceKey) is the same idea for keyed registrations: the alias resolves to the instance already registered under the source key, so a type dispatched by a wire value - an alg, an event type - answers a second contract without a second instance.
Composition: many implementations behind one contract
Compose collapses a family of registrations into a single composite behind the singular contract - the shape of a validation pipeline, a chain of handlers, a set of strategies consulted in order:
services.AddTransient<IValidator, SyntaxValidator>();
services.AddTransient<IValidator, BusinessRuleValidator>();
services.Compose<IValidator, CompositeValidator>();
What makes this composition editable is Decompose: a live cursor over the composed members that a host uses to adjust a pipeline a library assembled, without rebuilding it:
services.Decompose<IValidator>()
.AddBefore<BusinessRuleValidator>(ServiceDescriptor.Transient<IValidator, TenantPolicyValidator>())
.Remove<SyntaxValidator>();
Members keep their own lifetimes, the composite adopts the shortest among them, and edits act on the registrations themselves - there is no hidden side registry to drift out of sync.
Decoration
Decorate wraps whatever is currently registered, preserving its lifetime - the standard way to add a cross-cutting concern without touching the original registration:
services.Decorate<ITokenValidator, LoggingTokenValidator>();
Both operations have keyed counterparts: ComposeKeyed and DecorateKeyed.
Per-call overrides
Dependency.Override constructs a service from the container while substituting only the named dependencies - the clean alternative to hand-built factories that freeze a constructor's shape into calling code:
services.AddSingleton<IReplayCache>(provider =>
provider.CreateService<DistributedReplayCache>(
Dependency.Override("Abblix.SecurityEvents:ReplayPrevention:")));
Overloads accept a type mapping, an instance, or a factory, and the same overrides ride the AddSingleton / AddScoped / AddTransient overloads this package adds. Every dependency not overridden resolves from the container as usual, so a new constructor parameter on the service does not break the factory.
Registration inspection
Find, FindRequired, FindAll, RemoveAll and ChangeLifetime operate on the registration list itself - the tools for the rare but real cases where a host must inspect or reshape what a library registered.
Part of the Abblix product family
The composition and decoration machinery here is what lets Abblix.OIDC.Server ship assembled pipelines a host can still edit; the full family lives in the repository.
License
Abblix.DependencyInjection is licensed under the Apache License 2.0.
Contacts
- General inquiries: info@abblix.com
- Support and security reports: support@abblix.com
- Website: Abblix OIDC Server
| Product | Versions 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. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. 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
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.8)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.8)
-
net8.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.8)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.8)
-
net9.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.8)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.8)
NuGet packages (5)
Showing the top 5 NuGet packages that depend on Abblix.DependencyInjection:
| Package | Downloads |
|---|---|
|
Abblix.JWT
JWT, JWS, JWE and JWK library for .NET built on the platform's own cryptography, with no dependency on Microsoft.IdentityModel. Sign, encrypt and validate tokens, manage JSON Web Keys, and keep signing keys in HashiCorp Vault, OpenBao or Azure Key Vault. |
|
|
Abblix.OIDC.Server
OpenID Connect and OAuth 2.0 server for ASP.NET Core, certified by the OpenID Foundation. Add a complete identity provider and authorization server to your own .NET application: every OIDC flow, PKCE, PAR, DPoP, JARM, CIBA, device flow, token exchange and FAPI 2.0. Runs on .NET 8, 9 and 10. |
|
|
Abblix.OIDC.Server.MVC
ASP.NET Core MVC integration for Abblix OIDC Server, the certified OpenID Connect and OAuth 2.0 provider. Controllers, model binding and routing for every protocol endpoint: add it to a controller-based application and get a complete identity provider. |
|
|
Abblix.SecurityEvents
Security Event Tokens (RFC 8417) for .NET with Subject Identifiers (RFC 9493), push (RFC 8935) and poll (RFC 8936) delivery, and OpenID Back-Channel Logout. Build, sign, deliver and validate security events between identity providers and relying parties. |
|
|
Abblix.OIDC.Server.MinimalAPI
ASP.NET Core Minimal API integration for Abblix OIDC Server, the certified OpenID Connect and OAuth 2.0 provider. Every protocol endpoint as a route handler with no MVC dependency: the lightest way to host an identity provider in .NET. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.4.0 | 287 | 9/5/2026 |
| 2.3.0 | 233 | 6/9/2026 |
| 2.2.0 | 439 | 2/18/2026 |
| 2.1.0 | 603 | 12/8/2025 |
| 2.0.1 | 680 | 12/1/2025 |
| 2.0.0 | 274 | 11/26/2025 |
| 1.6.0 | 336 | 8/14/2025 |
| 1.5.0 | 301 | 6/25/2025 |
| 1.4.0 | 358 | 4/9/2025 |
| 1.3.1 | 308 | 12/3/2024 |
| 1.3.0.1 | 284 | 11/28/2024 |
| 1.3.0 | 292 | 11/13/2024 |
| 1.2.0.1 | 250 | 10/16/2024 |
| 1.2.0 | 265 | 10/11/2024 |
| 1.1.0 | 354 | 7/9/2024 |
| 1.0.100 | 314 | 5/3/2024 |
Helpers a library needs to be a good citizen in a host's container. Decorate a service without re-registering it; alias one contract to another registration so both resolve to the same instance; compose a family of implementations into one composite behind its contract, then list, insert, trim or replace its members in place after registration - the same call works whether or not the family has been composed yet. Library defaults use try-add semantics, so whatever the host registered first wins. Per-call dependency overrides let a factory construct a service with one explicit value and everything else from the container. The DI layer behind Abblix OIDC Server, usable on its own. Full details: https://github.com/Abblix/Oidc.Server/releases/tag/v2.4