Esempio n. 1
0
 public RedisPipelineContext(IRedisConnectionWrapper redisManager, RedisPipelineConfig config, Action <string> logAction = null)
 {
     _redisManager = redisManager;
     _config       = config;
     _db           = _redisManager.GetDatabase(_config.DBSpace);
     _logAction    = logAction;
 }
Esempio n. 2
0
        public static AppBoot UseRedisPipeline(this AppBoot boot, RedisPipelineConfig config, Action <string> logAction = null)
        {
            var builder = new ContainerBuilder();

            var redisManager = EngineContext.Current.Resolve <IRedisConnectionWrapper>();

            builder.RegisterInstance(new RedisPipelineContext(redisManager, config, logAction)).As <IPipelineContext>().SingleInstance();

            builder.Update(EngineContext.Current.ContainerManager.Container);

            return(boot);
        }