DartSharp.Expressions.ArithmeticBinaryExpression.Apply C# (CSharp) Method

Apply() public method

public Apply ( object leftValue, object rightValue ) : object
leftValue object
rightValue object
return object
        public override object Apply(object leftValue, object rightValue)
        {
            if (this.operation == ArithmeticOperator.Add)
            {
                if (leftValue == null)
                    if (ObjectUtilities.IsNumber(rightValue))
                        leftValue = 0;

                if (rightValue == null)
                    if (ObjectUtilities.IsNumber(leftValue))
                        rightValue = 0;
            }
            else
            {
                if (leftValue == null)
                    leftValue = 0;
                if (rightValue == null)
                    rightValue = 0;
            }

            return this.function(leftValue, rightValue);
        }