Class RequestIdentifierMiddleware
Provides a Request ID middleware implementation for ASP.NET Core.
Inheritance
System.Object
RequestIdentifierMiddleware
Implements
Namespace: Cuemon.AspNetCore.Http.Headers
Assembly: Cuemon.AspNetCore.dll
Syntax
public class RequestIdentifierMiddleware : ConfigurableMiddleware<RequestIdentifierOptions>, IConfigurable<RequestIdentifierOptions>
Constructors
| Improve this DocRequestIdentifierMiddleware(RequestDelegate, IOptions<RequestIdentifierOptions>)
Initializes a new instance of the RequestIdentifierMiddleware class.
Declaration
public RequestIdentifierMiddleware(RequestDelegate next, IOptions<RequestIdentifierOptions> setup)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.AspNetCore.Http.RequestDelegate | next | The delegate of the request pipeline to invoke. |
Microsoft.Extensions.Options.IOptions<RequestIdentifierOptions> | setup | The RequestIdentifierOptions which need to be configured. |
RequestIdentifierMiddleware(RequestDelegate, Action<RequestIdentifierOptions>)
Initializes a new instance of the RequestIdentifierMiddleware class.
Declaration
public RequestIdentifierMiddleware(RequestDelegate next, Action<RequestIdentifierOptions> setup)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.AspNetCore.Http.RequestDelegate | next | The delegate of the request pipeline to invoke. |
System.Action<RequestIdentifierOptions> | setup | The RequestIdentifierOptions which need to be configured. |
Fields
| Improve this DocHttpContextItemsKey
The key from where the Request ID is stored throughout the request scope.
Declaration
public const string HttpContextItemsKey = "Cuemon.AspNetCore.Http.Headers.RequestIdentifierMiddleware"
Field Value
Type | Description |
---|---|
System.String |
Methods
| Improve this DocInvokeAsync(HttpContext)
Executes the RequestIdentifierMiddleware.
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.RequestIdentifierOptions>.InvokeAsync(Microsoft.AspNetCore.Http.HttpContext)