示例#1
0
        public static SimpleConstantValue Number(decimal value)
        {
            var val = new SimpleConstantValue();

            val._type        = DataType.Number;
            val._decimalPart = value;

            return(val);
        }
示例#2
0
        public static SimpleConstantValue DateTime(DateTime value)
        {
            var val = new SimpleConstantValue();

            val._type        = DataType.Date;
            val._integerPart = value.Ticks;

            return(val);
        }
示例#3
0
        private static SimpleConstantValue BooleanInternal(bool value)
        {
            var val = new SimpleConstantValue();

            val._type        = DataType.Boolean;
            val._integerPart = value == true ? 1 : 0;

            return(val);
        }
示例#4
0
        public static SimpleConstantValue Number(decimal value)
        {
            if (value == 0)
            {
                return(_staticIntZero);
            }

            if (value == 1)
            {
                return(_staticIntOne);
            }

            var val = new SimpleConstantValue();

            val._type        = DataType.Number;
            val._decimalPart = value;

            return(val);
        }
示例#5
0
 public static IValue Create(int value)
 {
     return(SimpleConstantValue.Number(value));
 }
示例#6
0
 public static IValue Create(DateTime value)
 {
     return(SimpleConstantValue.DateTime(value));
 }
示例#7
0
 public static IValue Create(bool value)
 {
     return(SimpleConstantValue.Boolean(value));
 }
示例#8
0
 public static IValue Create()
 {
     return(SimpleConstantValue.Undefined());
 }
示例#9
0
        public static SimpleConstantValue DateTime(DateTime value)
        {
            var val = new SimpleConstantValue();
            val._type = DataType.Date;
            val._integerPart = value.Ticks;

            return val;
        }
示例#10
0
        public static SimpleConstantValue Number(decimal value)
        {
            var val = new SimpleConstantValue();
            val._type = DataType.Number;
            val._decimalPart = value;

            return val;
        }
示例#11
0
        private static SimpleConstantValue BooleanInternal(bool value)
        {
            var val = new SimpleConstantValue();
            val._type = DataType.Boolean;
            val._integerPart = value == true ? 1 : 0;

            return val;
        }