public static IAssimilate Redis( this IAssimilate assimilate, Action<RedisConfigurator> configure ) { var configurator = new RedisConfigurator(); configure( configurator ); Assimilate.Dependencies( x => x.For<RedisConfiguration>().Use( configurator.Configuration ) ); return assimilate; }
public static IAssimilate Redis(this IAssimilate assimilate, Action <RedisConfigurator> configure) { var configurator = new RedisConfigurator(); configure(configurator); Assimilate.Dependencies(x => x.For <RedisConfiguration>().Use(configurator.Configuration)); return(assimilate); }
public Action<DependencyConfigurator> Dependencies() { var configurator = new RedisConfigurator(); return x => { x.For<RedisConfiguration>().Use( configurator.Configuration ); x.For<IConnectionPool>().Use<LockingConnectionPool>().AsSingleton(); x.For<IRedisClient>().Use<RedisClient>(); x.For<ICacheSerializer>().Use<ProtobufCacheSerializer>(); x.For<IConnectionProvider>().Use<PooledConnectionProvider>(); x.For<IConnectionFactory>().Use<ConnectionFactory>(); }; }
public Action <DependencyConfigurator> Dependencies() { var configurator = new RedisConfigurator(); return(x => { x.For <RedisConfiguration>().Use(configurator.Configuration); x.For <IConnectionPool>().Use <LockingConnectionPool>().AsSingleton(); x.For <IRedisClient>().Use <RedisClient>(); x.For <ICacheSerializer>().Use <ProtobufCacheSerializer>(); x.For <IConnectionProvider>().Use <PooledConnectionProvider>(); x.For <IConnectionFactory>().Use <ConnectionFactory>(); }); }