Table of Contents

Class Middleware<T>

Namespace
Cuemon.AspNetCore
Assembly
Cuemon.AspNetCore.dll

Provides a base-class for middleware implementation in ASP.NET Core with one dependency injected parameters.

public abstract class Middleware<T> : MiddlewareCore

Type Parameters

T

The type of the dependency injected parameter of InvokeAsync(HttpContext, T).

Inheritance
Middleware<T>
Inherited Members

Constructors

Middleware(RequestDelegate)

Initializes a new instance of the Middleware class.

protected Middleware(RequestDelegate next)

Parameters

next RequestDelegate

The delegate of the request pipeline to invoke.

Methods

InvokeAsync(HttpContext, T)

Executes the Middleware<T>.

public abstract Task InvokeAsync(HttpContext context, T di)

Parameters

context HttpContext

The context of the current request.

di T

The dependency injected parameter of InvokeAsync(HttpContext, T).

Returns

Task

A task that represents the execution of this middleware.

See Also

ConfigurableMiddleware<T, TOptions>