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