예제 #1
0
        private async Task CreateOnlyOnceApiClients(EnvironmentSeed seed, string token)
        {
            var existingClients = await _oc.ApiClients.ListAllAsync(accessToken : token);

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

            await Task.WhenAll(integrationsClientRequest, sellerClientRequest, buyerClientRequest, buyerLocalClientRequest);
        }
        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);
        }