private static EventStoreHost BuildEventStoreHost(BaseConfiguration cfg, IMessageBus messageBus) { IEventPublisher eventPublisher = EventStoreConfigurationExtensions.GetEventPublisher(cfg, false); if (eventPublisher == null) { eventPublisher = new MessageBusEventPublisher(messageBus); } IDocumentStoreFactory docStoreFactory = EventStoreConfigurationExtensions.GetDocumentStoreFactory(cfg); EventStoreDB eStore = EventStoreConfigurationExtensions.GetEventStoreDB(cfg); EventStoreHost host = new EventStoreHost(eStore, eventPublisher, docStoreFactory); return(host); }
private static EventStoreHost BuildEventStoreHost(BaseConfiguration cfg, IMessageBus messageBus) { IEventPublisher eventPublisher = EventStoreConfigurationExtensions.GetEventPublisher(cfg, false); if (eventPublisher == null) eventPublisher = new MessageBusEventPublisher(messageBus); IDocumentStoreFactory docStoreFactory = EventStoreConfigurationExtensions.GetDocumentStoreFactory(cfg); EventStoreDB eStore = EventStoreConfigurationExtensions.GetEventStoreDB(cfg); EventStoreHost host = new EventStoreHost(eStore, eventPublisher, docStoreFactory); return host; }