Example #1
0
        /// <summary>
        ///     Decodes the integer.
        /// </summary>
        /// <returns></returns>
        private int DecodeInteger(Type expectedType, long offset, int size)
        {
            ReflectionUtil.CheckType(expectedType, typeof(int));

            return(_database.ReadInteger(0, offset, size));
        }
Example #2
0
 /// <summary>
 ///     Decodes the big integer.
 /// </summary>
 /// <returns></returns>
 private BigInteger DecodeBigInteger(Type expectedType, long offset, int size)
 {
     ReflectionUtil.CheckType(expectedType, typeof(BigInteger));
     return(_database.ReadBigInteger(offset, size));
 }
Example #3
0
        private byte[] DecodeBytes(Type expectedType, long offset, int size)
        {
            ReflectionUtil.CheckType(expectedType, typeof(byte[]));

            return(_database.Read(offset, size));
        }
Example #4
0
 /// <summary>
 ///     Decodes the uint64.
 /// </summary>
 /// <returns></returns>
 private ulong DecodeUInt64(Type expectedType, long offset, int size)
 {
     ReflectionUtil.CheckType(expectedType, typeof(ulong));
     return(_database.ReadULong(offset, size));
 }
Example #5
0
        /// <summary>
        ///     Decodes the string.
        /// </summary>
        /// <returns></returns>
        private string DecodeString(Type expectedType, long offset, int size)
        {
            ReflectionUtil.CheckType(expectedType, typeof(string));

            return(_database.ReadString(offset, size));
        }