public PersistentEventStore( ILoggerFactory loggerFactory, DomainEventSender sender, DomainEventFactory eventFactory, IConfiguration configuration) { _sender = sender; _logger = loggerFactory.CreateLogger <PersistentEventStore>(); var connectionString = configuration.GetConnectionString("EventStore"); if (connectionString == null) { throw new InvalidOperationException("Connection string 'EventStore' must be set."); } _client = CreateClientWithConnection(connectionString, loggerFactory); _eventFactory = eventFactory; }
public EventStore(DomainEventSender sender, DomainEventFactory eventFactory, IClock clock) { _sender = sender; _eventFactory = eventFactory; _clock = clock; }