Table of Contents

Class RequestIdentifierMiddleware

Namespace
Cuemon.AspNetCore.Http.Headers
Assembly
Cuemon.AspNetCore.dll

Provides a Request ID middleware implementation for ASP.NET Core.

public class RequestIdentifierMiddleware : ConfigurableMiddleware<RequestIdentifierOptions>, IConfigurable<RequestIdentifierOptions>
Inheritance
RequestIdentifierMiddleware
Implements
Inherited Members

Constructors

RequestIdentifierMiddleware(RequestDelegate, IOptions<RequestIdentifierOptions>)

Initializes a new instance of the RequestIdentifierMiddleware class.

public RequestIdentifierMiddleware(RequestDelegate next, IOptions<RequestIdentifierOptions> setup)

Parameters

next RequestDelegate

The delegate of the request pipeline to invoke.

setup IOptions<RequestIdentifierOptions>

The RequestIdentifierOptions which need to be configured.

RequestIdentifierMiddleware(RequestDelegate, Action<RequestIdentifierOptions>)

Initializes a new instance of the RequestIdentifierMiddleware class.

public RequestIdentifierMiddleware(RequestDelegate next, Action<RequestIdentifierOptions> setup)

Parameters

next RequestDelegate

The delegate of the request pipeline to invoke.

setup Action<RequestIdentifierOptions>

The RequestIdentifierOptions which need to be configured.

Fields

HttpContextItemsKey

The key from where the Request ID is stored throughout the request scope.

public const string HttpContextItemsKey = "Cuemon.AspNetCore.Http.Headers.RequestIdentifierMiddleware"

Field Value

String

Methods

InvokeAsync(HttpContext)

public override Task InvokeAsync(HttpContext context)

Parameters

context HttpContext

The context of the current request.

Returns

Task

A task that represents the execution of this middleware.