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

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

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

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

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

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

            return(val);
        }
Beispiel #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);
        }
 public static IValue Create(int value)
 {
     return(SimpleConstantValue.Number(value));
 }
 public static IValue Create(DateTime value)
 {
     return(SimpleConstantValue.DateTime(value));
 }
 public static IValue Create(bool value)
 {
     return(SimpleConstantValue.Boolean(value));
 }
 public static IValue Create()
 {
     return(SimpleConstantValue.Undefined());
 }
Beispiel #9
0
        public static SimpleConstantValue DateTime(DateTime value)
        {
            var val = new SimpleConstantValue();
            val._type = DataType.Date;
            val._integerPart = value.Ticks;

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

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

            return val;
        }