Files

27 lines
785 B
C#
Executable File

using Opsoft.NetCore.O3App.Shared;
namespace Opsoft.NetCore.O3App.Domain.Models
{
public class TraceContext
{
public TraceContext(string traceId, string header = TraceIdOptions.DefaultHeader)
{
Guard.ArgumentNotNullOrWhiteSpace(traceId, nameof(traceId));
Guard.ArgumentNotNullOrWhiteSpace(header, nameof(header));
TraceId = traceId;
Header = header;
}
/// <summary>
/// The Trace ID which is applicable to the current request.
/// </summary>
public string TraceId { get; }
/// <summary>
/// The name of the header from which the Trace ID is read/written.
/// </summary>
public string Header { get; }
}
}