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