From #4084 (comment)
We could enhance and unify Ranges. Currently Min and Max values are allowed but user can want to exclude them. Ex., "Positive" exclude zero. So the "Positive" range looks:
ValidateRange(0, int.MaxValue, RangeOption.ExcludeMin)
"Negative":
ValidateRange( -int.MaxValue, 0, RangeOption.ExcludeMax)
Exclude both (allow 0.5):
ValidateRange( 0, 1, RangeOption.ExcludeMin+RangeOption.ExcludeMax)
And we can move switch (rangeKind) to a constructor (with assigning a specific error message) and implement general ValidateElement method.
From #4084 (comment)
We could enhance and unify Ranges. Currently Min and Max values are allowed but user can want to exclude them. Ex., "Positive" exclude zero. So the "Positive" range looks:
"Negative":
Exclude both (allow 0.5):
And we can move
switch (rangeKind)to a constructor (with assigning a specific error message) and implement general ValidateElement method.