Beispiel #1
0
        public override ScalarValue Decode(System.IO.Stream in_Renamed)
        {
            ScalarValue subtractionLength = INTEGER.Decode(in_Renamed);
            ScalarValue difference        = ASCII.Decode(in_Renamed);

            return(new TwinValue(subtractionLength, difference));
        }
Beispiel #2
0
        public override ScalarValue Decode(System.IO.Stream in_Renamed)
        {
            int exponent = ((IntegerValue)INTEGER.Decode(in_Renamed)).value_Renamed;

            if (Math.Abs(exponent) > 63)
            {
                Global.HandleError(Error.FastConstants.R1_LARGE_DECIMAL, "Encountered exponent of size " + exponent);
            }

            long mantissa     = INTEGER.Decode(in_Renamed).ToLong();
            var  decimalValue = new DecimalValue(mantissa, exponent);

            return(decimalValue);
        }
        public override ScalarValue Decode(System.IO.Stream in_Renamed)
        {
            ScalarValue exp = NULLABLE_INTEGER.Decode(in_Renamed);

            if ((exp == null) || exp.Null)
            {
                return(null);
            }

            int  exponent     = exp.ToInt();
            long mantissa     = INTEGER.Decode(in_Renamed).ToLong();
            var  decimalValue = new DecimalValue(mantissa, exponent);

            return(decimalValue);
        }
Beispiel #4
0
        public override ScalarValue Decode(System.IO.Stream in_Renamed)
        {
            var  numericValue  = ((NumericValue)INTEGER.Decode(in_Renamed));
            long value_Renamed = numericValue.ToLong();

            if (value_Renamed == 0)
            {
                return(null);
            }

            if (value_Renamed > 0)
            {
                return(numericValue.Decrement());
            }

            return(numericValue);
        }
        public override ScalarValue Decode(System.IO.Stream in_Renamed)
        {
            int millisecondsSinceMidnight = INTEGER.Decode(in_Renamed).ToInt();

            System.Globalization.Calendar cal = new System.Globalization.GregorianCalendar();
            int hour = millisecondsSinceMidnight / 3600000;

            millisecondsSinceMidnight -= hour * 3600000;
            SupportClass.CalendarManager.manager.Set(cal, SupportClass.CalendarManager.HOUR_OF_DAY, hour);
            int minute = millisecondsSinceMidnight / 60000;

            millisecondsSinceMidnight -= minute * 60000;
            SupportClass.CalendarManager.manager.Set(cal, SupportClass.CalendarManager.MINUTE, minute);
            int second = millisecondsSinceMidnight / 1000;

            millisecondsSinceMidnight -= second * 1000;
            SupportClass.CalendarManager.manager.Set(cal, SupportClass.CalendarManager.SECOND, second);
            int millisecond = millisecondsSinceMidnight;

            SupportClass.CalendarManager.manager.Set(cal, SupportClass.CalendarManager.MILLISECOND, millisecond);
            System.DateTime tempAux = SupportClass.CalendarManager.manager.GetDateTime(cal);
            return(new DateValue(ref tempAux));
        }
Beispiel #6
0
        public override ScalarValue Decode(System.IO.Stream in_Renamed)
        {
            var tempAux = new DateTime(INTEGER.Decode(in_Renamed).ToLong());

            return(new DateValue(ref tempAux));
        }