Exemple #1
0
        public object GetValue(byte formatByte, ValueInfo valueInfo, byte[] contentBytes)
        {
            if (formatByte == 0xd3)
            {
                return(NumericConverter.ToInt64(contentBytes));
            }

            if ((formatByte & 0x80) == 0)
            {
                return((int)formatByte);
            }
            if ((formatByte & 0xe0) == 0xe0)
            {
                return((int)(formatByte | 0xffffff00));
            }

            var number = NumericConverter.ToInt32(contentBytes);

            return(ExpandNegativeInteger(formatByte, number));
        }