This commit is contained in:
2025-10-27 17:39:18 -04:00
commit 31f723bea4
1579 changed files with 642409 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
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);