Table of Contents

Class CorrelationIdentifierMiddleware

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

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

public class CorrelationIdentifierMiddleware : ConfigurableMiddleware<CorrelationIdentifierOptions>, IConfigurable<CorrelationIdentifierOptions>
Inheritance
CorrelationIdentifierMiddleware
Implements
Inherited Members

Constructors

CorrelationIdentifierMiddleware(RequestDelegate, IOptions<CorrelationIdentifierOptions>)

Initializes a new instance of the CorrelationIdentifierMiddleware class.

public CorrelationIdentifierMiddleware(RequestDelegate next, IOptions<CorrelationIdentifierOptions> setup)

Parameters

next RequestDelegate

The delegate of the request pipeline to invoke.

setup IOptions<CorrelationIdentifierOptions>

The CorrelationIdentifierOptions which need to be configured.

CorrelationIdentifierMiddleware(RequestDelegate, Action<CorrelationIdentifierOptions>)

Initializes a new instance of the CorrelationIdentifierMiddleware class.

public CorrelationIdentifierMiddleware(RequestDelegate next, Action<CorrelationIdentifierOptions> setup)

Parameters

next RequestDelegate

The delegate of the request pipeline to invoke.

setup Action<CorrelationIdentifierOptions>

The CorrelationIdentifierOptions which need to be configured.

Fields

HttpContextItemsKey

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

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

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.