Table of Contents

Class Middleware<T1, T2>

Namespace
Cuemon.AspNetCore
Assembly
Cuemon.AspNetCore.dll

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

public abstract class Middleware<T1, T2> : MiddlewareCore

Type Parameters

T1

The type of the first dependency injected parameter of InvokeAsync(HttpContext, T1, T2).

T2

The type of the second dependency injected parameter of InvokeAsync(HttpContext, T1, T2).

Inheritance
Object
Middleware<T1, T2>
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, T1, T2)

Executes the Middleware<T1, T2>.

public abstract Task InvokeAsync(HttpContext context, T1 di1, T2 di2)

Parameters

context HttpContext

The context of the current request.

di1 T1

The first dependency injected parameter of InvokeAsync(HttpContext, T1, T2).

di2 T2

The second dependency injected parameter of InvokeAsync(HttpContext, T1, T2).

Returns

Task

A task that represents the execution of this middleware.

See Also

ConfigurableMiddleware<T1, T2, TOptions>