Beispiel #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));
        }
Beispiel #2
0
 private bool LessThanUpperBound(T val)
 {
     return(Upper.CompareTo(val) > 0);
 }
Beispiel #3
0
 public bool IsValid(object obj) => Lower.CompareTo(obj) <= 0 && Upper.CompareTo(obj) >= 0;
Beispiel #4
0
 private bool LowerThanOrEqualToUpperBound(T val)
 {
     return(Upper.CompareTo(val) >= 0);
 }