Class Middleware<T>
Provides a base-class for middleware implementation in ASP.NET Core with one dependency injected parameters.
Inherited Members
Namespace: Cuemon.AspNetCore
Assembly: Cuemon.AspNetCore.dll
Syntax
public abstract class Middleware<T> : MiddlewareCore
Type Parameters
Name | Description |
---|---|
T | The type of the dependency injected parameter of InvokeAsync(HttpContext, T). |
Constructors
| Improve this DocMiddleware(RequestDelegate)
Initializes a new instance of the Middleware class.
Declaration
protected Middleware(RequestDelegate next)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.AspNetCore.Http.RequestDelegate | next | The delegate of the request pipeline to invoke. |
Methods
| Improve this DocInvokeAsync(HttpContext, T)
Executes the Middleware<T>.
Declaration
public abstract Task InvokeAsync(HttpContext context, T di)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.AspNetCore.Http.HttpContext | context | The context of the current request. |
T | di | The dependency injected parameter of InvokeAsync(HttpContext, T). |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task that represents the execution of this middleware. |
Extension Methods
See Also
ConfigurableMiddleware<T, TOptions>