Class CorrelationIdentifierMiddleware
Provides a Correlation ID middleware implementation for ASP.NET Core.
Inheritance
System.Object
CorrelationIdentifierMiddleware
Implements
Inherited Members
Namespace: Cuemon.AspNetCore.Http.Headers
Assembly: Cuemon.AspNetCore.dll
Syntax
public class CorrelationIdentifierMiddleware : ConfigurableMiddleware<CorrelationIdentifierOptions>, IConfigurable<CorrelationIdentifierOptions>
Constructors
| Improve this DocCorrelationIdentifierMiddleware(RequestDelegate, IOptions<CorrelationIdentifierOptions>)
Initializes a new instance of the CorrelationIdentifierMiddleware class.
Declaration
public CorrelationIdentifierMiddleware(RequestDelegate next, IOptions<CorrelationIdentifierOptions> setup)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.AspNetCore.Http.RequestDelegate | next | The delegate of the request pipeline to invoke. |
Microsoft.Extensions.Options.IOptions<CorrelationIdentifierOptions> | setup | The CorrelationIdentifierOptions which need to be configured. |
CorrelationIdentifierMiddleware(RequestDelegate, Action<CorrelationIdentifierOptions>)
Initializes a new instance of the CorrelationIdentifierMiddleware class.
Declaration
public CorrelationIdentifierMiddleware(RequestDelegate next, Action<CorrelationIdentifierOptions> setup)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.AspNetCore.Http.RequestDelegate | next | The delegate of the request pipeline to invoke. |
System.Action<CorrelationIdentifierOptions> | setup | The CorrelationIdentifierOptions which need to be configured. |
Fields
| Improve this DocHttpContextItemsKey
The key from where the Correlation ID is stored throughout the request scope.
Declaration
public const string HttpContextItemsKey = "Cuemon.AspNetCore.Http.Headers.CorrelationIdentifierMiddleware"
Field Value
Type | Description |
---|---|
System.String |
Methods
| Improve this DocInvokeAsync(HttpContext)
Executes the CorrelationIdentifierMiddleware.
Declaration
public override Task InvokeAsync(HttpContext context)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.AspNetCore.Http.HttpContext | context | The context of the current request. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task that represents the execution of this middleware. |
Overrides
Cuemon.AspNetCore.ConfigurableMiddleware<Cuemon.AspNetCore.Http.Headers.CorrelationIdentifierOptions>.InvokeAsync(Microsoft.AspNetCore.Http.HttpContext)