コード例 #1
0
ファイル: AzureCounterStore.cs プロジェクト: lanicon/BeeHive
 public AzureCounterStore(
     BlobSource source)
 {
     _source    = source;
     _lockStore = new AzureLockStore(
         new BlobSource()
     {
         ContainerName    = source.ContainerName,
         ConnectionString = source.ConnectionString,
         Path             = source.Path.TrimEnd('/') + "/" + "_locks_"
     });
 }
コード例 #2
0
ファイル: AzureCounterStore.cs プロジェクト: kgeis/BeeHive
        public AzureCounterStore(
            BlobSource source)
        {
            _source = source;
            _lockStore = new AzureLockStore(
                new BlobSource()
                {
                    ContainerName = source.ContainerName,
                    ConnectionString = source.ConnectionString,
                    Path = source.Path.TrimEnd('/') + "/" + "_locks_"
                });

            GetClientAndReference();
        }
コード例 #3
0
ファイル: AzureLockStore.cs プロジェクト: kgeis/BeeHive
 public AzureLockStore(BlobSource source)
 {
     _source = source;
     GetClientAndReference();
 }
コード例 #4
0
 public AzureLockStore(BlobSource source)
 {
     _source = source;
 }
コード例 #5
0
ファイル: AzureLockStore.cs プロジェクト: csuffyy/BeeHive
 public AzureLockStore(BlobSource source)
 {
     _source = source;
     GetClientAndReference();
 }
コード例 #6
0
ファイル: WorkerRole.cs プロジェクト: csuffyy/BeeHive
        public void ConfigureDI(IWindsorContainer container)
        {
            var serviceLocator = new WindsorServiceLocator(container);

            container.Register(

                Component.For<Orchestrator>()
                .ImplementedBy<Orchestrator>()
                .LifestyleTransient(),

                Component.For<IActorConfiguration>()
                    .Instance(
                    ActorDescriptors.FromAssemblyContaining<OrderAccepted>()
                    .ToConfiguration()),

                Component.For<IServiceLocator>()
                    .Instance(serviceLocator),

                Component.For<IFactoryActor>()
                    .ImplementedBy<FactoryActor>()
                    .LifestyleTransient(),

                Component.For<IEventQueueOperator>()
                    .ImplementedBy<ServiceBusOperator>()
                    .DynamicParameters((k, dic)
                        =>
                    {
                        dic["connectionString"] = _configurationValueProvider.GetValue("BusConnectionString");
                    })
                    .LifestyleSingleton(),

                Component.For(typeof(ICollectionStore<>))
                .ImplementedBy(typeof(AzureCollectionStore<>))
                 .DynamicParameters((k, dic)
                        =>
                 {
                     dic["connectionString"] = _configurationValueProvider.GetValue("StorageConnectionString");
                 })
                .LifestyleSingleton(),

                Component.For(typeof(ICounterStore))
                .ImplementedBy(typeof(AzureCounterStore))
                 .DynamicParameters((k, dic)
                        =>
                 {
                     dic["source"] = new BlobSource()
                     {
                         ConnectionString = _configurationValueProvider.GetValue("StorageConnectionString"),
                         ContainerName = "locks",
                         Path = "helloLocks/"
                     };

                 })
                .LifestyleSingleton(),

                Component.For(typeof(IKeyedListStore<>))
                .ImplementedBy(typeof(AzureKeyedListStore<>))
                 .DynamicParameters((k, dic)
                        =>
                 {
                     dic["connectionString"] = _configurationValueProvider.GetValue("StorageConnectionString");
                 })
                .LifestyleSingleton(),

                Classes.FromAssemblyContaining<Order>()
                    .Pick()
            );
        }