Cirreum.Services.Server 1.2.5

dotnet add package Cirreum.Services.Server --version 1.2.5
                    
NuGet\Install-Package Cirreum.Services.Server -Version 1.2.5
                    
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.Services.Server" Version="1.2.5" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Cirreum.Services.Server" Version="1.2.5" />
                    
Directory.Packages.props
<PackageReference Include="Cirreum.Services.Server" />
                    
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.Services.Server --version 1.2.5
                    
#r "nuget: Cirreum.Services.Server, 1.2.5"
                    
#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.Services.Server@1.2.5
                    
#: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.Services.Server&version=1.2.5
                    
Install as a Cake Addin
#tool nuget:?package=Cirreum.Services.Server&version=1.2.5
                    
Install as a Cake Tool

Cirreum.Services.Server

NuGet Version NuGet Downloads GitHub Release License .NET

Infrastructure services for .NET server applications

Overview

Cirreum.Services.Server provides essential infrastructure services for .NET server applications (Web API and Web App). This library offers a comprehensive foundation with enterprise-grade patterns for exception handling, caching, security, health checks, and file system operations.

Features

  • Invocation Context Bridge: HTTP→IInvocationContext middleware that publishes a unified, transport-agnostic per-invocation seam consumed by framework code (CQRS handlers, authorization, audit, repositories) — see ADR-0002
  • Global Exception Handling: RFC 7807 compliant Problem Details with environment-aware responses
  • Hybrid Caching: Modern caching infrastructure with tag-based invalidation and smart expiration policies
  • Security Services: Claims-based user context management and authentication integration
  • Health Checks: Application readiness probes and startup health monitoring
  • File System Services: Resilient local file operations with CSV processing capabilities
  • DateTime Services: Timezone-aware clock services with TimeProvider integration
  • Dependency Injection: Clean service registration patterns following .NET conventions

Quick Start

Install the package:

dotnet add package Cirreum.Services.Server

Register services in your application:

using Microsoft.Extensions.DependencyInjection;

// Add core infrastructure services
builder.Services.AddCoreServices();

// Add global exception handling
builder.Services.AddGlobalExceptionHandling();

// Add health checks with startup probe
builder.Services.AddDefaultHealthChecks();

Wire the invocation-context bridge into your HTTP pipeline. Placement matters — register after authentication and authorization so the snapshotted IInvocationContext.User reflects the fully-resolved authenticated principal:

using Microsoft.AspNetCore.Builder;

app.UseExceptionHandler();
app.UseRouting();
app.UseAuthentication();
app.UseAuthorization();
app.UseInvocationContext();   // ← here: AuthN/AuthZ resolved, ready for endpoint
app.MapEndpoints();

Apps using Cirreum.Runtime.Server's Build() composition pick up UseInvocationContext() automatically — no manual wiring required.

Service Registration

The library provides extension methods for clean service registration:

  • AddCoreServices() - Registers IInvocationContextAccessor (singleton, AsyncLocal-backed), file system, datetime, security, and caching services
  • AddGlobalExceptionHandling() - Configures RFC 7807 exception handling pipeline
  • AddDefaultHealthChecks() - Sets up health check infrastructure with startup monitoring

Pipeline Extensions

  • UseInvocationContext() - Publishes an IInvocationContext for every HTTP request through IInvocationContextAccessor. Snapshots User (immutable for the invocation), aliases HttpContext.Items (same dictionary reference — existing AuthenticationContextKeys slots flow through transparently), and exposes RequestServices / RequestAborted through the unified seam. Register late — after UseAuthentication() / UseAuthorization(), before endpoint execution.

Architecture

Built on the IServerDomainApplicationBuilder pattern extending IDomainApplicationBuilder, providing:

  • Configuration management through IConfigurationManager
  • Host environment information via IHostEnvironment
  • Deferred logging capabilities for startup diagnostics

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.Services.Server 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 (1)

Showing the top 1 NuGet packages that depend on Cirreum.Services.Server:

Package Downloads
Cirreum.Runtime.Server

The Cirreum Runtime for Servers.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.2.5 113 5/11/2026
1.2.4 114 5/10/2026
1.2.3 129 5/10/2026
1.2.2 116 5/9/2026
1.2.1 116 5/8/2026
1.2.0 105 5/7/2026
1.1.0 103 5/1/2026
1.0.47 115 4/28/2026
1.0.46 110 4/27/2026
1.0.45 110 4/26/2026
1.0.44 144 4/13/2026
1.0.43 109 4/13/2026
1.0.42 107 4/13/2026
1.0.41 123 4/10/2026
1.0.39 121 3/25/2026
1.0.38 112 3/21/2026
1.0.37 137 3/17/2026
1.0.36 136 3/16/2026
1.0.35 142 3/14/2026
1.0.34 138 3/13/2026
Loading failed