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