Esempio n. 1
0
        private static IStoreEvents ComposeEventStore(IComponentContext context)
        {
            var scope = context.Resolve <ILifetimeScope>();

            var publisher = new DelegateMessagePublisher(commit => DispatchCommit(scope, commit));

            var store = Wireup.Init()
                        .UsingSqlAzurePersistence("EventStoreConnectionString")
                        .InitializeStorageEngine()
                        .UsingJsonSerialization()
                        .Compress()
                        .UsingAsynchronousDispatcher()
                        .PublishTo(publisher)
                        .Build();

            return(store);
        }
        private static IStoreEvents ComposeEventStore(IComponentContext context)
        {
            var scope = context.Resolve<ILifetimeScope>();

            var publisher = new DelegateMessagePublisher(commit=> DispatchCommit(scope, commit));

            var store = Wireup.Init()
                .UsingSqlAzurePersistence("EventStoreConnectionString")
                .InitializeStorageEngine()
                .UsingJsonSerialization()
                .Compress()
                .UsingAsynchronousDispatcher()
                .PublishTo(publisher)
                .Build();

            return store;
        }
        private IStoreEvents ComposeEventStore(IComponentContext context)
        {
            var scope = context.Resolve <ILifetimeScope>();

            var publisher = new DelegateMessagePublisher(commit => DispatchCommit(scope, commit));

            var pipelineHooks = context.Resolve <IEnumerable <IPipelineHook> >();

            var store = Wireup.Init().UsingSqlPersistence("EventStore", eventStoreConnectionString)
                        .InitializeStorageEngine()
                        .UsingJsonSerialization()
                        .HookIntoPipelineUsing(pipelineHooks)
                        .UsingAsynchronousDispatcher()
                        .PublishTo(publisher)
                        .Build();

            return(store);
        }
        private IStoreEvents ComposeEventStore(IComponentContext context)
        {
            var scope = context.Resolve<ILifetimeScope>();

            var publisher = new DelegateMessagePublisher(commit => DispatchCommit(scope, commit));

            var pipelineHooks = context.Resolve<IEnumerable<IPipelineHook>>();

            var store = Wireup.Init().UsingSqlPersistence("EventStore", eventStoreConnectionString)
                .InitializeStorageEngine()
                .UsingJsonSerialization()
                .HookIntoPipelineUsing(pipelineHooks)
                .UsingAsynchronousDispatcher()
                .PublishTo(publisher)
                .Build();

            return store;
        }