Eigenverft.WebLib.Middleware.Primitives 1.0.0.5-g40a2f17cdc

This is a prerelease version of Eigenverft.WebLib.Middleware.Primitives.
dotnet add package Eigenverft.WebLib.Middleware.Primitives --version 1.0.0.5-g40a2f17cdc
                    
NuGet\Install-Package Eigenverft.WebLib.Middleware.Primitives -Version 1.0.0.5-g40a2f17cdc
                    
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="Eigenverft.WebLib.Middleware.Primitives" Version="1.0.0.5-g40a2f17cdc" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Eigenverft.WebLib.Middleware.Primitives" Version="1.0.0.5-g40a2f17cdc" />
                    
Directory.Packages.props
<PackageReference Include="Eigenverft.WebLib.Middleware.Primitives" />
                    
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 Eigenverft.WebLib.Middleware.Primitives --version 1.0.0.5-g40a2f17cdc
                    
#r "nuget: Eigenverft.WebLib.Middleware.Primitives, 1.0.0.5-g40a2f17cdc"
                    
#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 Eigenverft.WebLib.Middleware.Primitives@1.0.0.5-g40a2f17cdc
                    
#: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=Eigenverft.WebLib.Middleware.Primitives&version=1.0.0.5-g40a2f17cdc&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Eigenverft.WebLib.Middleware.Primitives&version=1.0.0.5-g40a2f17cdc&prerelease
                    
Install as a Cake Tool

Eigenverft.WebLib.Middleware.Primitives

NuGet Version NuGet Downloads Repository CI Targets License

Small ASP.NET Core building blocks for middleware composition, isolated pipeline branches, typed request features, and explicit response writing.

✨ At a glance

Capability What it does
Pipeline MapIsolated and MapRemaining create non-rejoining branches.
Infrastructure UseMiddlewareOnce, CreateUseSiteOptionsMonitor, and EnsureServicesRegistered support reusable middleware.
Features and responses Typed HttpContext feature helpers and WriteHtmlStatusResponseAsync.

πŸ“¦ Installation

dotnet add package Eigenverft.WebLib.Middleware.Primitives

πŸš€ Quick start

Split static subtrees from the application shell

using Eigenverft.WebLib.Middleware.Primitives.Pipeline;
using Microsoft.AspNetCore.Builder;

app.MapIsolated("/apps", apps =>
{
    apps.UseDefaultFiles();
    apps.UseStaticFiles();
});

app.MapRemaining(shell =>
{
    shell.UseRouting();
    shell.UseEndpoints(endpoints => endpoints.MapGet("/", () => "application shell"));
});

Package behavior

MapIsolated preserves the matched path segment for normal static-file middleware and prevents the branch from rejoining the remaining pipeline. It disables an already-active status-code-pages feature for that request, so branch-owned 404 handling cannot re-execute into the application shell. Declare all isolated mappings before MapRemaining. MapRemaining is an always-matching, non-rejoining branch with a normal IApplicationBuilder; endpoint routing stays in UseRouting and UseEndpoints.

UseMiddlewareOnce<TMiddleware>() avoids a second convention-based middleware registration in the same linear pipeline. ASP.NET Core branch builders inherit markers established before the branch; markers added inside a branch remain local. The helper does not deduplicate across rejoining pipeline graphs.

CreateUseSiteOptionsMonitor<TOptions>(configure) creates a reload-aware options monitor for one middleware use. It builds from registered configure and post-configure steps, applies the local override, then validates. The local monitor has its own cache and does not change global options. EnsureServicesRegistered<TService>(...) checks required registrations without activating services.

The Features namespace provides GetFeature, GetRequiredFeature, TryGetFeature, SetFeature, RemoveFeature, and GetOrCreateFeature helpers over HttpContext.Features.

WriteHtmlStatusResponseAsync(statusCode) writes a minimal HTML status page using ASP.NET Core’s reason phrase and HTML encoding. Use it for explicit middleware short-circuits; general application error handling belongs in Status Code Pages or Problem Details.

This package has no package dependencies. Eigenverft.WebLib.CanonicalHostRedirect builds on its middleware option helpers and includes this package transitively.

🎯 Target frameworks

Targets .NET 8 and .NET 10. A .NET 9 application can consume the compatible net8.0 asset.

πŸ“„ License

Licensed under the MIT License by Eigenverft.

Product 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 was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.
  • net8.0

    • No dependencies.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0.5-g40a2f17cdc 0 9/28/2026
1.0.0.5-g3f72d1412c 0 9/29/2026
1.0.0.2-gbfce1c5596 0 9/28/2026
1.0.0.2-g8afd56e9dc 0 9/12/2026

Initial capability package extracted from Eigenverft.WebLib.Infrastructure.

- ASP.NET Core middleware and request-pipeline primitives, typed HTTP context features, response helpers, and service registration utilities.
- Public namespaces and behavior remain compatible with the original Infrastructure implementation.