Esempio n. 1
0
        internal static async Task <PowerofficeClient> Create(
            PowerofficeApiSettings apiSettings,
            Guid clientKey)
        {
            var authorizationHeader = await GetAuthorizationHeader(apiSettings, clientKey);

            var powerofficeClient = new PowerofficeClient(authorizationHeader);

            lock (SetBaseAddressLock)
            {
                if (HttpClient.BaseAddress == null)
                {
                    HttpClient.BaseAddress = apiSettings.ApiBaseAddress;
                }
            }

            return(powerofficeClient);
        }
 public async Task <PowerofficeClient> Create(Guid clientKey)
 {
     return(await PowerofficeClient.Create(ApiSettings, clientKey));
 }