public static void BeGreater <T>(Func <T> argumentFunc, T lowerLimit) where T : IComparable { if (ComparablePredicates.IsLessOrEqual(argumentFunc(), lowerLimit)) { var argument = argumentFunc.GetParameter(p => p.IsLessOrEqual(lowerLimit)); throw new ArgumentException($"The argument '{argument.Name}' must not be less than or equal to {lowerLimit}.", argument.Name); } }
public static bool IsLessOrEqual <T>(this T first, T second) where T : struct, IComparable { return(ComparablePredicates.IsLessOrEqual(first, second)); }