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)); }
public static RedisData GetRootAsRedisData(ByteBuffer byteBuffer, RedisData obj) { return(obj.Init(byteBuffer.GetInt(byteBuffer.Position) + byteBuffer.Position, byteBuffer)); }