/// <summary> /// Instantiate a new instance of the <see cref="SnapshotStore"/> class. /// </summary> protected SnapshotStore(IConfigurationManager configurationManager, ISnapshotDeserialiser eventDeserialiser, ISnapshotBuilder snapshotBuilder, ILogger logger, ICorrelationIdHelper correlationIdHelper) { ConfigurationManager = configurationManager; EventDeserialiser = eventDeserialiser; SnapshotBuilder = snapshotBuilder; Logger = logger; CorrelationIdHelper = correlationIdHelper; }
/// <summary> /// Initializes a new instance of the <see cref="TableStorageSnapshotStore"/> class using the specified container. /// </summary> public TableStorageSnapshotStore(IConfigurationManager configurationManager, ISnapshotDeserialiser eventDeserialiser, ILogger logger, ICorrelationIdHelper correlationIdHelper, ISnapshotBuilder snapshotBuilder, ITableStorageSnapshotStoreConnectionStringFactory tableStorageSnapshotStoreConnectionStringFactory) : base(configurationManager, eventDeserialiser, logger, correlationIdHelper, snapshotBuilder, tableStorageSnapshotStoreConnectionStringFactory, (logger1, tableStorageSnapshotStoreConnectionStringFactory1) => new RawTableStorageSnapshotStorer(logger1, tableStorageSnapshotStoreConnectionStringFactory1)) { }
/// <summary> /// Initializes a new instance of the <see cref="BlobStorageSnapshotStore"/> class using the specified container. /// </summary> public BlobStorageSnapshotStore(IConfigurationManager configurationManager, ISnapshotDeserialiser eventDeserialiser, ILogger logger, ICorrelationIdHelper correlationIdHelper, ISnapshotBuilder snapshotBuilder, IBlobStorageSnapshotStoreConnectionStringFactory blobStorageSnapshotStoreConnectionStringFactory) : base(configurationManager, eventDeserialiser, snapshotBuilder, logger, correlationIdHelper) { BlobStorageStore = new RawBlobStorageSnapshotStore(logger, blobStorageSnapshotStoreConnectionStringFactory); }
/// <summary> /// Initializes a new instance of the <see cref="TableStorageEventStore{TAuthenticationToken}"/> class using the specified container. /// </summary> public TableStorageSnapshotStore(IConfigurationManager configurationManager, ISnapshotDeserialiser eventDeserialiser, ILogger logger, ICorrelationIdHelper correlationIdHelper, ISnapshotBuilder snapshotBuilder, ITableStorageSnapshotStoreConnectionStringFactory tableStorageSnapshotStoreConnectionStringFactory, Func <ILogger, ITableStorageSnapshotStoreConnectionStringFactory, RawTableStorageSnapshotStore> createRawTableStorageSnapshotStoreFunction = null) : base(configurationManager, eventDeserialiser, snapshotBuilder, logger, correlationIdHelper) { if (createRawTableStorageSnapshotStoreFunction == null) { createRawTableStorageSnapshotStoreFunction = (logger1, tableStorageSnapshotStoreConnectionStringFactory1) => new RawTableStorageSnapshotStore(logger1, tableStorageSnapshotStoreConnectionStringFactory1); } TableStorageStore = createRawTableStorageSnapshotStoreFunction(logger, tableStorageSnapshotStoreConnectionStringFactory); }
/// <summary> /// Instantiate a new instance of <see cref="AzureDocumentDbSnapshotStore"/>. /// </summary> public AzureDocumentDbSnapshotStore(IConfigurationManager configurationManager, ISnapshotDeserialiser eventDeserialiser, ILogger logger, ICorrelationIdHelper correlationIdHelper, ISnapshotBuilder snapshotBuilder, IAzureDocumentDbHelper azureDocumentDbHelper, IAzureDocumentDbSnapshotStoreConnectionStringFactory azureDocumentDbSnapshotStoreConnectionStringFactory) : base(configurationManager, eventDeserialiser, snapshotBuilder, logger, correlationIdHelper) { AzureDocumentDbHelper = azureDocumentDbHelper; AzureDocumentDbSnapshotStoreConnectionStringFactory = azureDocumentDbSnapshotStoreConnectionStringFactory; }
/// <summary> /// Instantiate a new instance of the <see cref="SqlSnapshotStore"/> class. /// </summary> public SqlSnapshotStore(IConfigurationManager configurationManager, ISnapshotDeserialiser eventDeserialiser, ILogger logger, ICorrelationIdHelper correlationIdHelper, ISnapshotBuilder snapshotBuilder) : base(configurationManager, eventDeserialiser, snapshotBuilder, logger, correlationIdHelper) { }
/// <summary> /// Instantiate a new instance of <see cref="MongoDbEventStore{TAuthenticationToken}"/> /// triggering any require index checks. /// </summary> public MongoDbSnapshotStore(IConfigurationManager configurationManager, ISnapshotDeserialiser eventDeserialiser, ILogger logger, ICorrelationIdHelper correlationIdHelper, ISnapshotBuilder snapshotBuilder, IMongoDbSnapshotStoreConnectionStringFactory mongoDbSnapshotStoreConnectionStringFactory) : base(configurationManager, eventDeserialiser, snapshotBuilder, logger, correlationIdHelper) { MongoDbSnapshotStoreConnectionStringFactory = mongoDbSnapshotStoreConnectionStringFactory; // ReSharper disable DoNotCallOverridableMethodsInConstructor MongoCollection = GetCollection(); VerifyIndexes(); // ReSharper restore DoNotCallOverridableMethodsInConstructor }