Beispiel #1
0
        public override ScalarValue Decode(System.IO.Stream in_Renamed)
        {
            int intValue = ((IntegerValue)UINT.Decode(in_Renamed)).value_Renamed;

            System.DateTime tempAux = Util.ToTimestamp(intValue);
            return(new DateValue(ref tempAux));
        }
Beispiel #2
0
        public override ScalarValue Decode(System.IO.Stream in_Renamed)
        {
            long longValue = UINT.Decode(in_Renamed).ToLong();
            var  year      = (int)(longValue / 10000);
            var  month     = (int)((longValue - (year * 10000)) / 100);
            var  day       = (int)(longValue % 100);

            System.DateTime tempAux = Util.Date(year, month, day);
            return(new DateValue(ref tempAux));
        }
        public override ScalarValue Decode(System.IO.Stream in_Renamed)
        {
            var value_Renamed = (NumericValue)UINT.Decode(in_Renamed);

            if (value_Renamed.Equals(0))
            {
                return(null);
            }

            return(value_Renamed.Decrement());
        }
Beispiel #4
0
        public override ScalarValue Decode(System.IO.Stream in_Renamed)
        {
            int intValue = ((IntegerValue)UINT.Decode(in_Renamed)).value_Renamed;
            int hour     = intValue / 10000000;

            intValue -= hour * 10000000;
            int minute = intValue / 100000;

            intValue -= minute * 100000;
            int second = intValue / 1000;

            intValue -= second * 1000;
            int millisecond = intValue % 1000;
            var tempAux     = new DateTime(hour * 3600000 + minute * 60000 + second * 1000 + millisecond);

            return(new DateValue(ref tempAux));
        }
Beispiel #5
0
        public override ScalarValue Decode(System.IO.Stream in_Renamed)
        {
            int length   = ((IntegerValue)UINT.Decode(in_Renamed)).value_Renamed;
            var encoding = new byte[length];

            for (int i = 0; i < length; i++)
            {
                try
                {
                    encoding[i] = (byte)in_Renamed.ReadByte();
                }
                catch (System.IO.IOException e)
                {
                    throw new RuntimeException(e);
                }
            }
            return(new ByteVectorValue(encoding));
        }