public static EventStoreRepository Create(IEventStoreRepositoryConfiguration repositoryConfiguration)
        {
            var eventStoreConnection = new ExternalEventStore(repositoryConfiguration.ConnectionString, repositoryConfiguration.ConnectionSettings).Connection;
            var repository           = new EventStoreRepository(repositoryConfiguration, eventStoreConnection, new ConnectionStatusMonitor(eventStoreConnection));

            return(repository);
        }
        public EventStoreQueueAdapter(string providerName,
                                      IEventStoreRepositoryConfiguration eventStoreRepositoryConfiguration,
                                      ILoggerFactory loggerFactory)
        {
            _eventStoreRepositoryConfiguration = eventStoreRepositoryConfiguration;
            _loggerFactory = loggerFactory;

            Name = providerName;

            EventStore = EventStoreRepository.Create(eventStoreRepositoryConfiguration);
        }
Пример #3
0
 public async override Task OnActivateAsync()
 {
     _repository = EventStoreRepository.Create(_eventStoreConfiguration);
     await _repository.Connect(TimeSpan.FromSeconds(5));
 }