Пример #1
0
        public bool VisitExprDecimalLiteral(ExprDecimalLiteral expr, TCtx arg)
        {
            var res = this.Visit(expr, "DecimalLiteral", arg, out var argOut);

            this.VisitPlainProperty("Value", expr.Value, argOut);
            this._visitor.EndVisitExpr(expr, arg);
            return(res);
        }
Пример #2
0
        public TRes VisitExprDecimalLiteral(ExprDecimalLiteral decimalLiteral, ExprValueTypeAnalyzerCtx <TRes, TCtx> ctx)
        {
            DecimalPrecisionScale?precisionScale = null;

            if (decimalLiteral.Value.HasValue)
            {
                SqlDecimal sd = decimalLiteral.Value.Value;
                precisionScale = new DecimalPrecisionScale(sd.Precision, sd.Scale);
            }

            return(ctx.ValueVisitor.VisitDecimal(ctx.Ctx, !decimalLiteral.Value.HasValue, precisionScale));
        }
Пример #3
0
        public bool VisitExprDecimalLiteral(ExprDecimalLiteral decimalLiteral, IExpr?parent)
        {
            if (decimalLiteral.Value.HasValue)
            {
                this.Builder.Append(decimalLiteral.Value.Value.ToString(CultureInfo.InvariantCulture));
            }
            else
            {
                this.AppendNull();
            }

            return(true);
        }
Пример #4
0
 public static ExprDecimalLiteral WithValue(this ExprDecimalLiteral original, Decimal?newValue)
 => new ExprDecimalLiteral(value: newValue);