This site provides a machine-readable index at /llms.txt.

Skip to main content Skip to navigation

ApiReferenceRewriteMiddleware Pennington.DocSite.Api

Rewrites inbound request paths under any configured public RoutePrefix onto the internal /_pnn_api/{Name}/... shape that ApiReferencePage.razor matches. Runs before Blazor's router so the component sees a stable route template regardless of how the caller configured the public URL.

Constructors

.ctor

#
public ApiReferenceRewriteMiddleware(RequestDelegate next, ApiReferenceRegistrationRegistry registry);

Initializes the middleware.

Parameters

next RequestDelegate
registry ApiReferenceRegistrationRegistry

Methods

InvokeAsync

#
public Task InvokeAsync(HttpContext context);

Handles the rewrite; forwards to the next middleware either way.

Parameters

context HttpContext

Returns

Task

Pennington.DocSite.Api.ApiReferenceRewriteMiddleware

namespace Pennington.DocSite.Api;

/// Rewrites inbound request paths under any configured public RoutePrefix onto the internal /_pnn_api/{Name}/... shape that ApiReferencePage.razor matches. Runs before Blazor's router so the component sees a stable route template regardless of how the caller configured the public URL.
public class ApiReferenceRewriteMiddleware
{
    /// Initializes the middleware.
    
public ApiReferenceRewriteMiddleware(RequestDelegate next, ApiReferenceRegistrationRegistry registry);
/// Handles the rewrite; forwards to the next middleware either way.
public Task InvokeAsync(HttpContext context);
}