Class ConfigurableMiddleware<TOptions>
- Namespace
- Cuemon.AspNetCore
- Assembly
- Cuemon.AspNetCore.dll
Provides an base-class for configurable middleware implementation in ASP.NET Core that supports the options pattern.
public abstract class ConfigurableMiddleware<TOptions> : ConfigurableMiddlewareCore<TOptions>, IConfigurable<TOptions> where TOptions : class, IParameterObject, new()
Type Parameters
TOptions
The type of the options to setup.
- Inheritance
-
ConfigurableMiddlewareCore<TOptions>ConfigurableMiddleware<TOptions>
- Implements
-
IConfigurable<TOptions>
- Derived
- Inherited Members
Constructors
ConfigurableMiddleware(RequestDelegate, IOptions<TOptions>)
Initializes a new instance of the ConfigurableMiddleware<TOptions> class.
protected ConfigurableMiddleware(RequestDelegate next, IOptions<TOptions> setup)
Parameters
next
RequestDelegateThe delegate of the request pipeline to invoke.
setup
IOptions<TOptions>The IOptions<TOptions> which need to be configured.
ConfigurableMiddleware(RequestDelegate, Action<TOptions>)
Initializes a new instance of the ConfigurableMiddleware<TOptions> class.
protected ConfigurableMiddleware(RequestDelegate next, Action<TOptions> setup)
Parameters
next
RequestDelegateThe delegate of the request pipeline to invoke.
setup
Action<TOptions>The Action<T> which need to be configured.
Methods
InvokeAsync(HttpContext)
Executes the Middleware.
public abstract Task InvokeAsync(HttpContext context)
Parameters
context
HttpContextThe context of the current request.
Returns
- Task
A task that represents the execution of this middleware.