public CosmosDBEventStoreInitializer( CosmosClient client, IAggregateOptionsMonitor <TAggregate, TKey, CosmosDBEventStoreOptions> monitor) { if (client is null) { throw new ArgumentNullException(nameof(client)); } if (monitor is null) { throw new ArgumentNullException(nameof(monitor)); } _client = client; _options = monitor.AggregateOptions; }
public CosmosDBEventStore( CosmosClient client, IAggregateOptionsMonitor <TAggregate, TKey, CosmosDBEventStoreOptions> monitor) { if (client is null) { throw new ArgumentNullException(nameof(client)); } if (monitor is null) { throw new ArgumentNullException(nameof(monitor)); } CosmosDBEventStoreOptions options = monitor.AggregateOptions; _container = client.GetContainer(options.DatabaseId, options.ContainerId); }