21 lines
1.2 KiB
C#
21 lines
1.2 KiB
C#
namespace Prefab.Handler;
|
|
|
|
/// <summary>
|
|
/// Represents contextual information about the current request and user for use in request handling and logging.
|
|
/// </summary>
|
|
/// <remarks>This record is typically used to pass request-scoped metadata through application layers, enabling
|
|
/// consistent logging, tracing, and idempotency handling. All properties are optional and may be null if the
|
|
/// corresponding information is unavailable.</remarks>
|
|
/// <param name="UserId">The unique identifier of the user associated with the request, or null if the user is unauthenticated.</param>
|
|
/// <param name="RequestId">The unique identifier for the current request, used for tracing and diagnostics. Can be null if not set.</param>
|
|
/// <param name="CorrelationId">The identifier used to correlate this request with related operations across services or components. Can be null if
|
|
/// not set.</param>
|
|
/// <param name="IdempotencyKey">A key that uniquely identifies the request for idempotency purposes, allowing safe retries. Can be null if
|
|
/// idempotency is not required.</param>
|
|
public sealed record HandlerContext(
|
|
string? UserId,
|
|
string? RequestId,
|
|
string? CorrelationId,
|
|
string? IdempotencyKey);
|
|
|