public sealed record RetryOptions(int Attempts, TimeSpan Delay) { public static RetryOptions Default => new(3, TimeSpan.FromMilliseconds(200)); public RetryOptions Validate() { if (Attempts < 1) throw new ArgumentOutOfRangeException(nameof(Attempts)); if (Delay < TimeSpan.Zero) throw new ArgumentOutOfRangeException(nameof(Delay)); return this; } }