Table of Contents

RequestIdentifierOptions Class

Definition

Configuration options for RequestIdentifierMiddleware.

public class RequestIdentifierOptions : IValidatableParameterObject, IParameterObject
Inheritance
object
RequestIdentifierOptions
Implements

Examples

The following example demonstrates how to configure to customize the Request-ID header name and token generator.

using System;
using Cuemon.Messaging;

        namespace Cuemon.AspNetCore.Http.Headers;

        public static class RequestIdentifierOptionsExample
        {
            public static void Demonstrate()
            {
                var options = new RequestIdentifierOptions
        {
            Token = new RequestToken("req-42")
        };

        options.ValidateOptions();
        Console.WriteLine(options.Token.RequestId);
            }
        }

Constructors

Name Description
RequestIdentifierOptions()

Initializes a new instance of the RequestIdentifierOptions class.

Properties

Name Description
HeaderName

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

Token

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

Methods

Name Description
ValidateOptions()

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