Exemple #1
0
 public override void Visit(ValueExpression expression)
 {
     Result = expression.Value;
 }
Exemple #2
0
        public override void Visit(ValueExpression expression)
        {
            switch (expression.Type)
            {
                case ValueType.Boolean:
                    Result.Append(expression.Value.ToString()).Append(" ");
                    break;

                case ValueType.DateTime:
                    Result.Append("#").Append(expression.Value.ToString()).Append("#").Append(" ");
                    break;

                case ValueType.Float:
                    Result.Append(decimal.Parse(expression.Value.ToString()).ToString(_numberFormatInfo)).Append(" ");
                    break;

                case ValueType.Integer:
                    Result.Append(expression.Value.ToString()).Append(" ");
                    break;

                case ValueType.String:
                    Result.Append("'").Append(expression.Value.ToString()).Append("'").Append(" ");
                    break;
            }
        }
 public override void Visit(ValueExpression expression)
 {
     Result.Append(expression);
 }
Exemple #4
0
            public override void Visit(ValueExpression expression)
            {

            }
 public override void Visit(ValueExpression expression)
 {
     if (expression.Type == NCalc.Domain.ValueType.Integer)
     {
         base.Visit(expression);
     }
     else
         if (expression.Type == ValueType.Float)
         {
             Result.Append("Convert.ToDouble(");
             base.Visit(expression);
             Result.Append(")");
         }
         else
         {
             if (expression.Type == ValueType.String)
             {
                 Result.Append(" \"").Append(expression.Value.ToString()).Append("\" ");
             }
             else
                 if (expression.Type == ValueType.Boolean)
                 {
                     Result.Append(expression.Value.ToString().ToLower()).Append(" ");
                 }
                 else
                 {
                     base.Visit(expression);
                 }
         }
 }
 public override void Visit(ValueExpression expression)
 {
     _result = L.Expression.Constant(expression.Value);
 }
Exemple #7
0
 public override void Visit(ValueExpression expression)
 {
     Result = expression.Value;
 }
Exemple #8
0
 public override void Visit(NCalc.Domain.ValueExpression expression)
 {
 }
 public override void Visit(ValueExpression expression)
 {
     // base.Visit(expression);
 }
Exemple #10
0
 public abstract Task VisitAsync(ValueExpression expression);
Exemple #11
0
 public abstract void Visit(ValueExpression expression);