Cirreum.ServiceProvider 1.0.7

dotnet add package Cirreum.ServiceProvider --version 1.0.7
                    
NuGet\Install-Package Cirreum.ServiceProvider -Version 1.0.7
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Cirreum.ServiceProvider" Version="1.0.7" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Cirreum.ServiceProvider" Version="1.0.7" />
                    
Directory.Packages.props
<PackageReference Include="Cirreum.ServiceProvider" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Cirreum.ServiceProvider --version 1.0.7
                    
#r "nuget: Cirreum.ServiceProvider, 1.0.7"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Cirreum.ServiceProvider@1.0.7
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Cirreum.ServiceProvider&version=1.0.7
                    
Install as a Cake Addin
#tool nuget:?package=Cirreum.ServiceProvider&version=1.0.7
                    
Install as a Cake Tool

Cirreum.ServiceProvider

NuGet Version NuGet Downloads GitHub Release License .NET

Foundation library for building service providers with health checks and telemetry

Overview

Cirreum.ServiceProvider provides base classes and patterns for implementing service providers within the Cirreum ecosystem. This library standardizes service registration, health monitoring, and telemetry integration across all service provider implementations.

Features

  • Standardized Service Registration: Base classes for consistent DI container integration
  • Built-in Health Checks: Automatic health monitoring with configurable options
  • OpenTelemetry Integration: First-class support for distributed tracing
  • Multi-Instance Support: Configure and manage multiple instances per provider type
  • Connection String Management: Automatic validation and uniqueness enforcement
  • Type-Safe Configuration: Generic constraints ensure compile-time configuration safety

Core Components

ServiceProviderRegistrar<TSettings, TInstanceSettings, THealthOptions>

Abstract base class that handles:

  • Service registration with dependency injection
  • Health check configuration and registration
  • OpenTelemetry tracing setup
  • Connection string validation
  • Instance management and duplicate prevention

ServiceProviderSettings & ServiceProviderInstanceSettings

Configuration hierarchy providing:

  • Provider-level settings with tracing controls
  • Instance-specific connection and health check configuration
  • Automatic connection string parsing and validation

Health Check Integration

  • Configurable health monitoring per instance
  • Readiness and liveness check categorization
  • Custom failure status and timeout configuration
  • Automatic registration with .NET health check system

Quick Start

// Implement your service provider registrar
public class MyServiceProviderRegistrar 
    : ServiceProviderRegistrar<MySettings, MyInstanceSettings, MyHealthOptions>
{
    public override ProviderType ProviderType => ProviderType.Custom;
    public override string ProviderName => "MyService";
    public override string[] ActivitySourceNames => ["MyService.Activities"];
    
    protected override void AddServiceProviderInstance(
        IServiceCollection services, 
        string serviceKey, 
        MyInstanceSettings settings)
    {
        // Register your service implementation
        services.AddKeyedSingleton<IMyService>(serviceKey, 
            sp => new MyService(settings.ConnectionString));
    }
    
    protected override IServiceProviderHealthCheck<MyHealthOptions> CreateHealthCheck(
        IServiceProvider serviceProvider, 
        string serviceKey, 
        MyInstanceSettings settings)
    {
        return new MyServiceHealthCheck(serviceProvider, serviceKey, settings);
    }
}

// Configure and register
services.Configure<MySettings>(configuration.GetSection("MyService"));
services.AddSingleton<IProviderRegistrar<MySettings, MyInstanceSettings>, MyServiceProviderRegistrar>();

Contribution Guidelines

  1. Be conservative with new abstractions
    The API surface must remain stable and meaningful.

  2. Limit dependency expansion
    Only add foundational, version-stable dependencies.

  3. Favor additive, non-breaking changes
    Breaking changes ripple through the entire ecosystem.

  4. Include thorough unit tests
    All primitives and patterns should be independently testable.

  5. Document architectural decisions
    Context and reasoning should be clear for future maintainers.

  6. Follow .NET conventions
    Use established patterns from Microsoft.Extensions.* libraries.

Versioning

Cirreum.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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (11)

Showing the top 5 NuGet packages that depend on Cirreum.ServiceProvider:

Package Downloads
Cirreum.Persistence.Azure

Persistence Library using Azure Cosmos DB for NoSQL.

Cirreum.Communications.Sms.Twilio

An Sms Library for Twilio.

Cirreum.Runtime.ServiceProvider

The Cirreum ServiceProvider for the Cirreum Runtime Server.

Cirreum.Persistence.Dapper

Dapper persistence provider for Cirreum framework

Cirreum.Messaging.Azure

Distributed messaging using Azure ServiceBus.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.7 427 1/22/2026
1.0.6 259 1/21/2026
1.0.5 932 12/20/2025
1.0.4 465 12/16/2025
1.0.3 436 11/24/2025
1.0.2 500 11/21/2025
1.0.0 423 11/21/2025