-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathCorrelationIdPreparerOptions.cs
More file actions
31 lines (29 loc) · 1.21 KB
/
CorrelationIdPreparerOptions.cs
File metadata and controls
31 lines (29 loc) · 1.21 KB
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
namespace Serilog.Preparers.CorrelationIds
{
/// <summary>
/// Settings for <see cref="ICorrelationIdPreparer"/>.
/// </summary>
public class CorrelationIdPreparerOptions
{
/// <summary>
/// Determines whether to add a new correlation ID value if the header is absent.
/// </summary>
public bool AddValueIfHeaderAbsence { get; }
/// <summary>
/// The header key used to retrieve the correlation ID from the HTTP request or response headers.
/// </summary>
public string HeaderKey { get; }
/// <summary>
/// Initializes a new instance of the <see cref="CorrelationIdPreparerOptions" /> class.
/// </summary>
/// <param name="addValueIfHeaderAbsence">Determines whether to add a new correlation ID value if the header is absent.</param>
/// <param name="headerKey">The header key used to retrieve the correlation ID from the HTTP request or response headers.</param>
public CorrelationIdPreparerOptions(
bool addValueIfHeaderAbsence,
string headerKey)
{
AddValueIfHeaderAbsence = addValueIfHeaderAbsence;
HeaderKey = headerKey;
}
}
}