Esempio n. 1
0
 public static IAssimilate Riak( this IAssimilate assimilate, Action<RiakConfigurator> configurate )
 {
     var configurator = new RiakConfigurator();
     configurate( configurator );
     Assimilate.Dependencies( x => x.For<IRiakConfiguration>().Use( configurator.Configuration ) );
     return assimilate;
 }
Esempio n. 2
0
 public Action<DependencyConfigurator> Dependencies()
 {
     var configurator = new RiakConfigurator();
     return container =>
                {
                    container.For<IRiakConfiguration>().Use( configurator.Configuration );
                    container.For<IConnectionFactory>().Use<ConnectionFactory>();
                    container.For<IConnectionProvider>().Use<PooledConnectionProvider>().AsSingleton();
                    container.For<ICommandFactory>().Use<ProtoBufCommandFactory>().AsSingleton();
                    container.For<IConnectionPool>().Use<LockingConnectionPool>();
                    container.For<IRiakClient>().Use<RiakClient>();
                    container.For<IDocumentRepository>().Use<RiakClient>();
                    container.For<IKeyValueStore>().Use<RiakClient>();
                    container.For<ITrackVectors>().Use<VectorRegistry>().AsSingleton();
                };
 }
Esempio n. 3
0
        public Action <DependencyConfigurator> Dependencies()
        {
            var configurator = new RiakConfigurator();

            return(container =>
            {
                container.For <IRiakConfiguration>().Use(configurator.Configuration);
                container.For <IConnectionFactory>().Use <ConnectionFactory>();
                container.For <IConnectionProvider>().Use <PooledConnectionProvider>().AsSingleton();
                container.For <ICommandFactory>().Use <ProtoBufCommandFactory>().AsSingleton();
                container.For <IConnectionPool>().Use <LockingConnectionPool>();
                container.For <IRiakClient>().Use <RiakClient>();
                container.For <IDocumentRepository>().Use <RiakClient>();
                container.For <IKeyValueStore>().Use <RiakClient>();
                container.For <ITrackVectors>().Use <VectorRegistry>().AsSingleton();
            });
        }