public CosmosDBSnapshotStoreInitializer(
            CosmosClient client,
            IAggregateOptionsMonitor <TAggregate, TKey, CosmosDBSnapshotStoreOptions> monitor)
        {
            if (client is null)
            {
                throw new ArgumentNullException(nameof(client));
            }

            if (monitor is null)
            {
                throw new ArgumentNullException(nameof(monitor));
            }

            _client  = client;
            _options = monitor.AggregateOptions;
        }
示例#2
0
        public CosmosDBSnapshotStore(
            CosmosClient client,
            IAggregateOptionsMonitor <TAggregate, TKey, CosmosDBSnapshotStoreOptions> monitor)
        {
            if (client is null)
            {
                throw new ArgumentNullException(nameof(client));
            }

            if (monitor is null)
            {
                throw new ArgumentNullException(nameof(monitor));
            }

            CosmosDBSnapshotStoreOptions options = monitor.AggregateOptions;

            _container = client.GetContainer(options.DatabaseId, options.ContainerId);
        }