Beispiel #1
0
 public AzureCounterStore(
     BlobSource source)
 {
     _source    = source;
     _lockStore = new AzureLockStore(
         new BlobSource()
     {
         ContainerName    = source.ContainerName,
         ConnectionString = source.ConnectionString,
         Path             = source.Path.TrimEnd('/') + "/" + "_locks_"
     });
 }
Beispiel #2
0
        public AzureCounterStore(
            BlobSource source)
        {
            _source = source;
            _lockStore = new AzureLockStore(
                new BlobSource()
                {
                    ContainerName = source.ContainerName,
                    ConnectionString = source.ConnectionString,
                    Path = source.Path.TrimEnd('/') + "/" + "_locks_"
                });

            GetClientAndReference();
        }
Beispiel #3
0
 public AzureLockStore(BlobSource source)
 {
     _source = source;
     GetClientAndReference();
 }
Beispiel #4
0
 public AzureLockStore(BlobSource source)
 {
     _source = source;
 }
Beispiel #5
0
 public AzureLockStore(BlobSource source)
 {
     _source = source;
     GetClientAndReference();
 }
Beispiel #6
0
        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()
            );
        }