Пример #1
0
        public int CompareTo(LimitBase other)
        {
            if (ReferenceEquals(this, other))
            {
                return(0);
            }
            if (other is null)
            {
                return(1);
            }
            var lowerLimitComparison = Lower.CompareTo(other.Lower);

            if (lowerLimitComparison != 0)
            {
                return(lowerLimitComparison);
            }
            return(Upper.CompareTo(other.Upper));
        }
Пример #2
0
 private bool LessThanUpperBound(T val)
 {
     return(Upper.CompareTo(val) > 0);
 }
Пример #3
0
 public bool IsValid(object obj) => Lower.CompareTo(obj) <= 0 && Upper.CompareTo(obj) >= 0;
Пример #4
0
 private bool LowerThanOrEqualToUpperBound(T val)
 {
     return(Upper.CompareTo(val) >= 0);
 }