Exemple #1
0
        public object Deserialize(Type type, byte[] data)
        {
            if (data == null)
            {
                throw new ArgumentNullException(nameof(data));
            }

            var redisData = RedisData.GetRootAsRedisData(new ByteBuffer(data));

            if (!string.IsNullOrEmpty(redisData.Type))
            {
                type = redisData.Type.ResolveType();
            }

            return(DeserializeInternal(type, redisData));
        }
Exemple #2
0
 public static RedisData GetRootAsRedisData(ByteBuffer byteBuffer, RedisData obj)
 {
     return(obj.Init(byteBuffer.GetInt(byteBuffer.Position) + byteBuffer.Position, byteBuffer));
 }