private void ValidateMinLessThanOrEqualMax(T min, T max) { if (BinaryOperation <T> .LessThanOrEqual(min, max)) { return; } throw new ArgumentException($"{nameof(Min)} must be <= {nameof(Max)}."); }
public static T Add(T left, T right) => BinaryOperation.GetOrAdd <T, T>(Expression.Add)(left, right);
public static T Subtract(T left, T right) => BinaryOperation.GetOrAdd <T, T>(Expression.Subtract)(left, right);
public static bool GreaterThanOrEqual(T left, T right) => BinaryOperation.GetOrAdd <T, bool>(Expression.GreaterThanOrEqual)(left, right);
public static bool LessThan(T left, T right) => BinaryOperation.GetOrAdd <T, bool>(Expression.LessThan)(left, right);
public static bool NotEqual(T left, T right) => BinaryOperation.GetOrAdd <T, bool>(Expression.NotEqual)(left, right);
public static T Divide(T left, T right) => BinaryOperation.GetOrAdd <T, T>(Expression.Divide)(left, right);
public static T Multiply(T left, T right) => BinaryOperation.GetOrAdd <T, T>(Expression.Multiply)(left, right);