예제 #1
0
        protected override void AppendBinaryExpression(StringBuilder builder, BinaryExpression binaryExpression)
        {
            if (this.UseParenthesesInAllExpressions)
                builder.Append("(");

            Append(builder, binaryExpression.Left);
            builder.Append(" ");
            Append(builder, binaryExpression.Operator);
            builder.Append(" ");
            Append(builder, binaryExpression.Right);

            if (this.UseParenthesesInAllExpressions)
                builder.Append(")");
        }
예제 #2
0
        protected override void AppendBinaryExpression(StringBuilder builder, BinaryExpression binaryExpression)
        {
            var useSpacesAroundOperator  = binaryExpression.Operator.Name != "..";
            if (this.UseParenthesesInAllExpressions)
                builder.Append("(");

            Append(builder, binaryExpression.Left);
            if (useSpacesAroundOperator)
                builder.Append(" ");

            Append(builder, binaryExpression.Operator);

            if (useSpacesAroundOperator)
                builder.Append(" ");
            Append(builder, binaryExpression.Right);

            if (this.UseParenthesesInAllExpressions)
                builder.Append(")");
        }
 protected virtual void AppendBinaryExpression(StringBuilder builder, BinaryExpression binaryExpression)
 {
     builder.Append(binaryExpression);
 }