Пример #1
0
        private async Task CreateOnlyOnceApiClients(EnvironmentSeed seed, string token)
        {
            var existingClients = await _oc.ApiClients.ListAllAsync(accessToken : token);

            await CreateOrGetBuyerClient(existingClients, SeedConstants.BuyerClient(seed), seed, token);
            await CreateOrGetApiClient(existingClients, SeedConstants.IntegrationsClient(), token);
            await CreateOrGetApiClient(existingClients, SeedConstants.SellerClient(), token);
            await CreateOrGetApiClient(existingClients, SeedConstants.BuyerLocalClient(seed), token);
        }
Пример #2
0
        private async Task CreateApiClients(string token)
        {
            var existingClients = await _oc.ApiClients.ListAllAsync(accessToken : token);

            var integrationsClientRequest = GetClientRequest(existingClients, SeedConstants.IntegrationsClient(), token);
            var sellerClientRequest       = GetClientRequest(existingClients, SeedConstants.SellerClient(), token);
            var buyerClientRequest        = GetClientRequest(existingClients, SeedConstants.BuyerClient(), token);
            var buyerLocalClientRequest   = GetClientRequest(existingClients, SeedConstants.BuyerLocalClient(), token);

            await Task.WhenAll(integrationsClientRequest, sellerClientRequest, buyerClientRequest, buyerLocalClientRequest);
        }