Cirreum.Runtime.ServiceProvider
1.0.6
dotnet add package Cirreum.Runtime.ServiceProvider --version 1.0.6
NuGet\Install-Package Cirreum.Runtime.ServiceProvider -Version 1.0.6
<PackageReference Include="Cirreum.Runtime.ServiceProvider" Version="1.0.6" />
<PackageVersion Include="Cirreum.Runtime.ServiceProvider" Version="1.0.6" />
<PackageReference Include="Cirreum.Runtime.ServiceProvider" />
paket add Cirreum.Runtime.ServiceProvider --version 1.0.6
#r "nuget: Cirreum.Runtime.ServiceProvider, 1.0.6"
#:package Cirreum.Runtime.ServiceProvider@1.0.6
#addin nuget:?package=Cirreum.Runtime.ServiceProvider&version=1.0.6
#tool nuget:?package=Cirreum.Runtime.ServiceProvider&version=1.0.6
Cirreum.Runtime.ServiceProvider
Simplified service provider registration for ASP.NET Core applications
Overview
Cirreum.Runtime.ServiceProvider provides a streamlined approach to registering and configuring service providers in ASP.NET Core applications. It extends the HostApplicationBuilder with a generic, type-safe method for registering service providers with built-in configuration binding, health checks, and duplicate prevention.
Key Features
- Type-safe Registration - Generic extension method with strong typing for settings and health options
- Configuration Binding - Automatic binding from
appsettings.jsonusing a consistent path pattern - Health Check Integration - Built-in support for ASP.NET Core health checks
- Duplicate Prevention - Automatic detection and prevention of duplicate provider registrations
- Deferred Logging - Initialization tracking with deferred logging support
Installation
dotnet add package Cirreum.Runtime.ServiceProvider
Usage
Register a service provider in your Program.cs:
var builder = WebApplication.CreateBuilder(args);
// Register a service provider with configuration
builder.RegisterServiceProvider<MyRegistrar, MySettings, MyInstanceSettings, MyHealthOptions>(
"MyProvider",
"MyProviderType"
);
Configure the provider in appsettings.json:
{
"Cirreum": {
"MyProviderType": {
"Providers": {
"MyProvider": {
"Setting1": "value1",
"Setting2": 123
}
}
}
}
}
Configuration Pattern
Service providers follow a consistent configuration path:
- Path:
Cirreum:{ProviderType}:Providers:{ProviderName} - Provider Type: Logical grouping of similar providers
- Provider Name: Unique identifier for each provider instance
Requirements
- .NET 10.0 or later
- ASP.NET Core application
Contribution Guidelines
Be conservative with new abstractions
The API surface must remain stable and meaningful.Limit dependency expansion
Only add foundational, version-stable dependencies.Favor additive, non-breaking changes
Breaking changes ripple through the entire ecosystem.Include thorough unit tests
All primitives and patterns should be independently testable.Document architectural decisions
Context and reasoning should be clear for future maintainers.Follow .NET conventions
Use established patterns from Microsoft.Extensions.* libraries.
Versioning
Cirreum.Runtime.ServiceProvider follows Semantic Versioning:
- Major - Breaking API changes
- Minor - New features, backward compatible
- Patch - Bug fixes, backward compatible
Given its foundational role, major version bumps are rare and carefully considered.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Cirreum Foundation Framework
Layered simplicity for modern .NET
| 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
- Cirreum.Logging.Deferred (>= 1.0.106)
- Cirreum.ServiceProvider (>= 1.0.7)
NuGet packages (7)
Showing the top 5 NuGet packages that depend on Cirreum.Runtime.ServiceProvider:
| Package | Downloads |
|---|---|
|
Cirreum.Runtime.Persistence
The Runtime Persistence service configuration. |
|
|
Cirreum.Runtime.Messaging
The Runtime Messaging service configuration. |
|
|
Cirreum.Runtime.Communications
The Runtime Communictions service configuration. |
|
|
Cirreum.Runtime.Storage
The Runtime Storage service configuration. |
|
|
Cirreum.Runtime.Persistence.Azure
The Runtime Persistence service configuration for Azure. |
GitHub repositories
This package is not used by any popular GitHub repositories.