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 SqlServerEventStoreEventTypeToIdMapper(string connectionString, IEventNameMapper nameMapper) { _nameMapper = nameMapper; _connectionMananger = new SqlServerEventStoreConnectionManager(connectionString); }
public SqlServerEventStoreSchemaManager(string connectionString, IEventNameMapper nameMapper) { ConnectionString = connectionString; _nameMapper = nameMapper; }
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); }