private async Task CheckUpdateTokenAsync() { if (string.IsNullOrWhiteSpace(SubscriptionKey)) { throw new ArgumentException("Invalid Subscription Key. Go to Azure Portal and sign up for Microsoft Translator: https://portal.azure.com/#create/Microsoft.CognitiveServices/apitype/TextTranslation"); } // If necessary, updates the access token. _authorizationHeaderValue = await _authToken.GetAccessTokenAsync().ConfigureAwait(false); }
private async Task CheckUpdateTokenAsync() { // If necessary, updates the access token. _authorizationHeaderValue = await _authToken.GetAccessTokenAsync().ConfigureAwait(false); }