Esempio n. 1
0
        public IBatchContainer FromRedisValue(RedisValue value, long sequenceId)
        {
            var container = _serializationManager.DeserializeFromByteArray <RedisBatchContainer>(value);

            container.RealSequenceToken = new EventSequenceTokenV2(sequenceId);
            return(container);
        }
        public static T GetObject <T>(this IDatabase redisClient, ISerializationManager serializationManager, string objectId)
        {
            var value = redisClient.StringGet(CreateUrn <T>(objectId));

            if (value.HasValue)
            {
                //Do special things here to handle versions in JSON.
                return(serializationManager.DeserializeFromByteArray <T>(value));
            }

            return(default);