Exemple #1
0
        private void ValidateMinLessThanOrEqualMax(T min, T max)
        {
            if (BinaryOperation <T> .LessThanOrEqual(min, max))
            {
                return;
            }

            throw new ArgumentException($"{nameof(Min)} must be <= {nameof(Max)}.");
        }
Exemple #2
0
 public static T Add(T left, T right) => BinaryOperation.GetOrAdd <T, T>(Expression.Add)(left, right);
Exemple #3
0
 public static T Subtract(T left, T right) => BinaryOperation.GetOrAdd <T, T>(Expression.Subtract)(left, right);
Exemple #4
0
 public static bool GreaterThanOrEqual(T left, T right) => BinaryOperation.GetOrAdd <T, bool>(Expression.GreaterThanOrEqual)(left, right);
Exemple #5
0
 public static bool LessThan(T left, T right) => BinaryOperation.GetOrAdd <T, bool>(Expression.LessThan)(left, right);
Exemple #6
0
 public static bool NotEqual(T left, T right) => BinaryOperation.GetOrAdd <T, bool>(Expression.NotEqual)(left, right);
Exemple #7
0
 public static T Divide(T left, T right) => BinaryOperation.GetOrAdd <T, T>(Expression.Divide)(left, right);
Exemple #8
0
 public static T Multiply(T left, T right) => BinaryOperation.GetOrAdd <T, T>(Expression.Multiply)(left, right);