public TimeSpanValidator(TimeSpan minValue, TimeSpan maxValue, bool rangeIsExclusive, long resolutionInSeconds) {
if (resolutionInSeconds < 0) {
throw new ArgumentOutOfRangeException("resolutionInSeconds");
}
if (minValue > maxValue) {
throw new ArgumentOutOfRangeException("minValue", SR.GetString(SR.Validator_min_greater_than_max));
}
_minValue = minValue;
_maxValue = maxValue;
_resolution = resolutionInSeconds;
_flags = rangeIsExclusive ? ValidationFlags.ExclusiveRange : ValidationFlags.None;
}