/// <summary> /// Adds a subscription key to the user. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='azureRegion'> /// Supported Azure regions for Cognitive Services endpoints. Possible values /// include: 'westus', 'westeurope' /// </param> /// <param name='userSubscriptionCreateObject'> /// Subscription key object. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task AddSubscriptionKeyAsync(this IUser operations, AzureRegions azureRegion, UserSubscriptionCreateObject userSubscriptionCreateObject = default(UserSubscriptionCreateObject), CancellationToken cancellationToken = default(CancellationToken)) { (await operations.AddSubscriptionKeyWithHttpMessagesAsync(azureRegion, userSubscriptionCreateObject, null, cancellationToken).ConfigureAwait(false)).Dispose(); }