/// <summary> /// Generates the text for an Addition builder. /// </summary> /// <param name="item">The Addition builder to generate the text for.</param> protected internal override void VisitAddition(Addition item) { visitArithmeticExpression(item, "+"); }
private object buildAdditiveOperator(MatchResult result, IProjectionItem leftHand, IProjectionItem rightHand, bool wrap) { MatchResult plusResult = result.Matches[SqlGrammar.AdditiveOperator.PlusOperator]; if (plusResult.IsMatch) { Addition addition = new Addition(leftHand, rightHand); addition.WrapInParentheses = wrap; return addition; } MatchResult minusResult = result.Matches[SqlGrammar.AdditiveOperator.MinusOperator]; if (minusResult.IsMatch) { Subtraction subtraction = new Subtraction(leftHand, rightHand); subtraction.WrapInParentheses = wrap; return subtraction; } throw new InvalidOperationException(); }
/// <summary> /// Visits an Addition builder. /// </summary> /// <param name="item">The item to visit.</param> protected internal virtual void VisitAddition(Addition item) { }