public SqlServerEventStore(string connectionString, ISingleContextUseGuard usageGuard, IEventNameMapper nameMapper = null, IEnumerable<IEventMigration> migrations = null) { Log.Debug("Constructor called"); _migrationFactories = migrations?.ToList() ?? new List<IEventMigration>(); nameMapper = nameMapper ?? new DefaultEventNameMapper(); ConnectionString = connectionString; _usageGuard = usageGuard; var eventSerializer = new SqlServerEvestStoreEventSerializer(); _cache = SqlServerEventStoreEventsCache.ForConnectionString(connectionString); _connectionMananger = new SqlServerEventStoreConnectionManager(connectionString); _schemaManager = new SqlServerEventStoreSchemaManager(connectionString, nameMapper); _eventReader = new SqlServerEventStoreEventReader(_connectionMananger, _schemaManager); _eventWriter = new SqlServerEventStoreEventWriter(_connectionMananger, eventSerializer, _schemaManager); }
public SqlServerEventStore(string connectionString, ISingleContextUseGuard usageGuard, IEventNameMapper nameMapper = null, IEnumerable <IEventMigration> migrations = null) { Log.Debug("Constructor called"); _migrationFactories = migrations?.ToList() ?? new List <IEventMigration>(); nameMapper = nameMapper ?? new DefaultEventNameMapper(); ConnectionString = connectionString; _usageGuard = usageGuard; var eventSerializer = new SqlServerEvestStoreEventSerializer(); _cache = SqlServerEventStoreEventsCache.ForConnectionString(connectionString); _connectionMananger = new SqlServerEventStoreConnectionManager(connectionString); _schemaManager = new SqlServerEventStoreSchemaManager(connectionString, nameMapper); _eventReader = new SqlServerEventStoreEventReader(_connectionMananger, _schemaManager); _eventWriter = new SqlServerEventStoreEventWriter(_connectionMananger, eventSerializer, _schemaManager); }