Пример #1
0
 private RangeValidatorAttribute(IComparable lowerBound, RangeBoundaryType lowerBoundType, IComparable upperBound, RangeBoundaryType upperBoundType)
 {
     ValidatorArgumentsValidatorHelper.ValidateRangeValidator(lowerBound, lowerBoundType, upperBound, upperBoundType);
     this.lowerBound     = lowerBound;
     this.lowerBoundType = lowerBoundType;
     this.upperBound     = upperBound;
     this.upperBoundType = upperBoundType;
 }
Пример #2
0
 public RangeValidator(T lowerBound, RangeBoundaryType lowerBoundType, T upperBound, RangeBoundaryType upperBoundType, string messageTemplate, bool negated) : base(messageTemplate, null, negated)
 {
     ValidatorArgumentsValidatorHelper.ValidateRangeValidator(lowerBound, lowerBoundType, upperBound, upperBoundType);
     this.rangeChecker = new RangeChecker <T>(lowerBound, lowerBoundType, upperBound, upperBoundType);
 }