You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 line
568B

  1. namespace Campaign_Tracker.Server.ExtensionData;
  2. /// <summary>
  3. /// Outcome of a pre-save legacy link validation (AC #3).
  4. /// On failure, <see cref="Error"/> contains a descriptive message identifying the invalid reference.
  5. /// </summary>
  6. public sealed record LegacyLinkValidationResult(bool IsValid, string? Error = null)
  7. {
  8. public static LegacyLinkValidationResult Success() => new(true);
  9. public static LegacyLinkValidationResult Failure(string error)
  10. {
  11. ArgumentException.ThrowIfNullOrWhiteSpace(error);
  12. return new(false, error);
  13. }
  14. }

Powered by TurnKey Linux.