Table of Contents

Class RequestIdentifierOptions

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

Configuration options for RequestIdentifierMiddleware.

public class RequestIdentifierOptions : IValidatableParameterObject, IParameterObject
Inheritance
Object
RequestIdentifierOptions
Implements

Constructors

RequestIdentifierOptions()

Initializes a new instance of the RequestIdentifierOptions class.

public RequestIdentifierOptions()

Remarks

The following table shows the initial property values for an instance of RequestIdentifierOptions.

PropertyInitial Value
HeaderNameXRequestId
TokenDynamicRequest.Create(Guid.NewGuid().ToString("N")

Properties

HeaderName

Gets or sets the name of the correlation identifier HTTP header.

public string HeaderName { get; set; }

Property Value

String

The name of the correlation identifier HTTP header.

Token

Gets or sets the IRequestToken that provides a Request ID implementation.

public IRequestToken Token { get; set; }

Property Value

IRequestToken

The IRequestToken that provides a Request ID implementation.

Methods

ValidateOptions()

Determines whether the public read-write properties of this instance are in a valid state.

public void ValidateOptions()

Remarks

This method is expected to throw exceptions when one or more conditions fails to be in a valid state.

Exceptions

System.InvalidOperationException

HeaderName cannot be null, empty or consist only of white-space characters - or - Token cannot be null.