Beispiel #1
0
        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();
            }
        }
Beispiel #2
0
        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();
            }
        }
Beispiel #3
0
 public void Dispose()
 {
     CosmosSetup.GetClient().DeleteDocumentCollectionAsync(UriFactory.CreateDocumentCollectionUri(this.Database, this.Collection)).Wait();
 }
Beispiel #4
0
        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);
        }
Beispiel #5
0
 public void Dispose()
 {
     CosmosSetup.GetClient().GetDatabase(this.Database).GetContainer(this.Container).DeleteContainerAsync().Wait();
 }
Beispiel #6
0
 public async Task TearDown()
 {
     await CosmosSetup.GetClient().DeleteDocumentCollectionAsync(UriFactory.CreateDocumentCollectionUri(this.Database, this.Collection));
 }
Beispiel #7
0
 public async Task TearDown()
 {
     await CosmosSetup.GetClient().GetDatabase(this.Database).GetContainer(this.Collection).DeleteContainerAsync();
 }