<PackageReference Include="System.Configuration.ConfigurationManager" Version="4.5.0-preview1-25914-04" />

LongValidatorAttribute

namespace System.Configuration { [AttributeUsage(AttributeTargets.Property)] public sealed class LongValidatorAttribute : ConfigurationValidatorAttribute { private long _max = 9223372036854775807; private long _min = -9223372036854775808; public override ConfigurationValidatorBase ValidatorInstance => new LongValidator(_min, _max, ExcludeRange); public long MinValue { get { return _min; } set { if (_max < value) throw new ArgumentOutOfRangeException("value", System.SR.Validator_min_greater_than_max); _min = value; } } public long MaxValue { get { return _max; } set { if (_min > value) throw new ArgumentOutOfRangeException("value", System.SR.Validator_min_greater_than_max); _max = value; } } public bool ExcludeRange { get; set; } } }