Beispiel #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)}.");
        }
Beispiel #2
0
 public static T Add(T left, T right) => BinaryOperation.GetOrAdd <T, T>(Expression.Add)(left, right);
Beispiel #3
0
 public static T Subtract(T left, T right) => BinaryOperation.GetOrAdd <T, T>(Expression.Subtract)(left, right);
Beispiel #4
0
 public static bool GreaterThanOrEqual(T left, T right) => BinaryOperation.GetOrAdd <T, bool>(Expression.GreaterThanOrEqual)(left, right);
Beispiel #5
0
 public static bool LessThan(T left, T right) => BinaryOperation.GetOrAdd <T, bool>(Expression.LessThan)(left, right);
Beispiel #6
0
 public static bool NotEqual(T left, T right) => BinaryOperation.GetOrAdd <T, bool>(Expression.NotEqual)(left, right);
Beispiel #7
0
 public static T Divide(T left, T right) => BinaryOperation.GetOrAdd <T, T>(Expression.Divide)(left, right);
Beispiel #8
0
 public static T Multiply(T left, T right) => BinaryOperation.GetOrAdd <T, T>(Expression.Multiply)(left, right);