public static async Task <ConfigurationsCollection <TConfiguration> > Create(
            DatabaseCredentials databaseCredentials,
            string collectionId)
        {
            await IntegrationsDatabase.Initialize(databaseCredentials);

            var integrationsCollection = new ConfigurationsCollection <TConfiguration>(collectionId);
            await IntegrationsDatabase.Client.CreateDocumentCollectionIfNotExistsAsync(
                IntegrationsDatabase.DatabaseUri,
                new DocumentCollection { Id = collectionId },
                new RequestOptions { OfferThroughput = 400 }
                );

            return(integrationsCollection);
        }
Example #2
0
        public static async Task <FortnoxConfigService> Create(DatabaseCredentials databaseCredentials)
        {
            var fortnoxCollection = await ConfigurationsCollection <FortnoxConfiguration> .Create(databaseCredentials, CollectionId);

            return(new FortnoxConfigService(fortnoxCollection));
        }
Example #3
0
 private FortnoxConfigService(ConfigurationsCollection <FortnoxConfiguration> fortnoxCollection)
 {
     FortnoxCollection = fortnoxCollection;
 }
Example #4
0
        public static async Task <PowerofficeConfigService> Create(DatabaseCredentials databaseCredentials)
        {
            var powerofficeCollection = await ConfigurationsCollection <PowerofficeConfiguration> .Create(databaseCredentials, CollectionId);

            return(new PowerofficeConfigService(powerofficeCollection));
        }
Example #5
0
 private PowerofficeConfigService(
     ConfigurationsCollection <PowerofficeConfiguration> powerofficeCollection)
 {
     PowerofficeCollection = powerofficeCollection;
 }