Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

24 строки
1000B

  1. namespace Campaign_Tracker.Server.ExtensionData;
  2. /// <summary>
  3. /// Immutable value object that an extension record stores as its required legacy foreign reference.
  4. /// Carry the <see cref="LegacyLinkType"/> and the string representation of the join key so
  5. /// the anti-corruption layer can resolve it unambiguously (AC #2).
  6. /// </summary>
  7. public sealed record LegacyLinkReference(LegacyLinkType Type, string Value)
  8. {
  9. public static LegacyLinkReference ForJurisdiction(string jCode)
  10. {
  11. ArgumentException.ThrowIfNullOrWhiteSpace(jCode);
  12. return new(LegacyLinkType.JurisdictionJCode, jCode);
  13. }
  14. public static LegacyLinkReference ForKit(int id) =>
  15. new(LegacyLinkType.KitId, id.ToString(System.Globalization.CultureInfo.InvariantCulture));
  16. public static LegacyLinkReference ForContact(int id) =>
  17. new(LegacyLinkType.ContactId, id.ToString(System.Globalization.CultureInfo.InvariantCulture));
  18. public override string ToString() => $"{Type}:{Value}";
  19. }

Powered by TurnKey Linux.