コード例 #1
0
        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;
        }
コード例 #2
0
        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);
        }