Class ApplicationBuilderMiddlewareExtensions
Provides small middleware-composition helpers.
Inherited Members
Namespace: Eigenverft.WebLib.Infrastructure.Hosting.Middleware.Infrastructure
Assembly: Eigenverft.WebLib.Infrastructure.dll
Syntax
public static class ApplicationBuilderMiddlewareExtensions
Methods
| Edit this page View SourceCreateUseSiteOptionsMonitor<TOptions>(IApplicationBuilder, Action<TOptions>)
Creates an isolated options monitor for one middleware use by rebuilding the registered options baseline and applying the supplied local override afterwards.
Declaration
public static IOptionsMonitor<TOptions> CreateUseSiteOptionsMonitor<TOptions>(this IApplicationBuilder app, Action<TOptions> configure) where TOptions : class
Parameters
| Type | Name | Description |
|---|---|---|
| IApplicationBuilder | app | The application builder for the concrete middleware use. |
| Action<TOptions> | configure | The local override to apply only to this options monitor. |
Returns
| Type | Description |
|---|---|
| IOptionsMonitor<TOptions> | An isolated, reload-aware options monitor. |
Type Parameters
| Name | Description |
|---|---|
| TOptions | The options type. |
Remarks
Global options are not modified and separate middleware uses remain independent. Registered configure and
post-configure steps build the baseline before configure runs, and registered validation
runs afterwards. Configuration reloads rebuild from the current registered baseline and then reapply the
same local override.
UseMiddlewareOnce<TMiddleware>(IApplicationBuilder)
Adds a convention-based middleware type once per linear application-builder pipeline.
Declaration
public static IApplicationBuilder UseMiddlewareOnce<TMiddleware>(this IApplicationBuilder app) where TMiddleware : class
Parameters
| Type | Name | Description |
|---|---|---|
| IApplicationBuilder | app |
Returns
| Type | Description |
|---|---|
| IApplicationBuilder |
Type Parameters
| Name | Description |
|---|---|
| TMiddleware |
Remarks
Native New() branch builders copy application properties, so a marker established before a non-rejoining branch is inherited while markers added inside one branch remain local to that branch. This helper intentionally does not attempt graph-wide deduplication for rejoining pipelines.