-
Notifications
You must be signed in to change notification settings - Fork 9.8k
/
HeaderPropagationMessageHandlerEntry.cs
41 lines (36 loc) · 1.7 KB
/
HeaderPropagationMessageHandlerEntry.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
namespace Microsoft.AspNetCore.HeaderPropagation;
/// <summary>
/// Define the configuration of an header for the <see cref="HeaderPropagationMessageHandler"/>.
/// </summary>
public class HeaderPropagationMessageHandlerEntry
{
/// <summary>
/// Creates a new <see cref="HeaderPropagationMessageHandlerEntry"/> with the provided <paramref name="capturedHeaderName"/>
/// and <paramref name="outboundHeaderName"/>.
/// </summary>
/// <param name="capturedHeaderName">
/// The name of the header to be used to lookup the headers captured by the <see cref="HeaderPropagationMiddleware"/>.
/// </param>
/// <param name="outboundHeaderName">
/// The name of the header to be added to the outgoing http requests by the <see cref="HeaderPropagationMessageHandler"/>.
/// </param>
public HeaderPropagationMessageHandlerEntry(
string capturedHeaderName,
string outboundHeaderName)
{
ArgumentNullException.ThrowIfNull(capturedHeaderName);
ArgumentNullException.ThrowIfNull(outboundHeaderName);
CapturedHeaderName = capturedHeaderName;
OutboundHeaderName = outboundHeaderName;
}
/// <summary>
/// Gets the name of the header to be used to lookup the headers captured by the <see cref="HeaderPropagationMiddleware"/>.
/// </summary>
public string CapturedHeaderName { get; }
/// <summary>
/// Gets the name of the header to be added to the outgoing http requests by the <see cref="HeaderPropagationMessageHandler"/>.
/// </summary>
public string OutboundHeaderName { get; }
}