private protected override void ValidateSet(T value) { if (!EnumInfoLookup <T> .IsDefined(value)) { throw new ArgumentOutOfRangeException(nameof(value), ExceptionMessages.InvalidEnumValue); } }
private protected override T Parse(string?input) { if (EnumInfoLookup <T> .TryParse(input, out var value)) { return(value); } throw new FormatException(ExceptionMessages.TextIsInvalidEnumValue); }
/// <inheritdoc /> internal override bool IsInVersion(FileFormatVersions fileFormat) { Debug.Assert(HasValue); return(fileFormat.AtLeast(EnumInfoLookup <T> .GetVersion(Value))); }
private protected override bool TryParse(string?input, out T value) => EnumInfoLookup <T> .TryParse(input, out value);
private protected override string GetText(T input) => EnumInfoLookup <T> .ToString(input);