Beispiel #1
0
        private object EvaluateInternal(EvaluateParams evaluateParams)
        {
            var valueChildOne = _evaluatorLeft.Evaluate(evaluateParams);

            if (valueChildOne == null)
            {
                return(null);
            }

            var valueChildTwo = _evaluatorRight.Evaluate(evaluateParams);

            if (valueChildTwo == null)
            {
                return(null);
            }

            // arithTypeEnumComputer is initialized by validation
            return(_arithTypeEnumComputer.Invoke(valueChildOne, valueChildTwo));
        }
Beispiel #2
0
 public void TestAddDouble()
 {
     MathArithTypeEnumExtensions.Computer computer = MathArithTypeEnum.ADD.GetComputer(typeof(double?), typeof(double?), typeof(double?), false, false, null);
     Assert.AreEqual(12.1d, computer.Invoke(5.5, 6.6));
 }