internal async Task Initialize(bool initializeEventStore = true) { this.Client = await CosmosSetup.GetClient(this.Database, this.Container); this.EventStore = new EventStore(this.Client, this.Database, this.Container, this.EventStoreOptions); if (initializeEventStore) { await this.EventStore.Initialize(); } }
internal async Task Initialize(bool initializeEventStore = true) { this.JsonSerializerSettings.ConfigureForNodaTime(DateTimeZoneProviders.Tzdb); this.Client = await CosmosSetup.GetClient(this.Database, this.Container, this.JsonSerializerSettings); this.EventStoreOptions.JsonSerializer = JsonSerializer.Create(this.JsonSerializerSettings); this.EventStore = new EventStore(this.Client, this.Database, this.Container, this.EventStoreOptions); if (initializeEventStore) { await this.EventStore.Initialize(); } }
public void Dispose() { CosmosSetup.GetClient().DeleteDocumentCollectionAsync(UriFactory.CreateDocumentCollectionUri(this.Database, this.Collection)).Wait(); }
internal async Task Initialize() { this.Client = await CosmosSetup.GetClient(this.Database, this.Collection, partitioned : this.Partitioned); this.EventStore = new EventStore(this.Client, this.Database, this.Collection, this.Partition); }
public void Dispose() { CosmosSetup.GetClient().GetDatabase(this.Database).GetContainer(this.Container).DeleteContainerAsync().Wait(); }
public async Task TearDown() { await CosmosSetup.GetClient().DeleteDocumentCollectionAsync(UriFactory.CreateDocumentCollectionUri(this.Database, this.Collection)); }
public async Task TearDown() { await CosmosSetup.GetClient().GetDatabase(this.Database).GetContainer(this.Collection).DeleteContainerAsync(); }