Ejemplo n.º 1
0
 /// <summary>
 /// Regenerate the key for a Media Service.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of the resource group within the Azure subscription.
 /// </param>
 /// <param name='mediaServiceName'>
 /// Name of the Media Service.
 /// </param>
 /// <param name='regenerateKeyInput'>
 /// Properties needed to regenerate the Media Service key.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <RegenerateKeyOutput> RegenerateKeyAsync(this IMediaServiceOperations operations, string resourceGroupName, string mediaServiceName, RegenerateKeyInput regenerateKeyInput, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.RegenerateKeyWithHttpMessagesAsync(resourceGroupName, mediaServiceName, regenerateKeyInput, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Regenerate the key for a Media Service.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of the resource group within the Azure subscription.
 /// </param>
 /// <param name='mediaServiceName'>
 /// Name of the Media Service.
 /// </param>
 /// <param name='regenerateKeyInput'>
 /// Properties needed to regenerate the Media Service key.
 /// </param>
 public static RegenerateKeyOutput RegenerateKey(this IMediaServiceOperations operations, string resourceGroupName, string mediaServiceName, RegenerateKeyInput regenerateKeyInput)
 {
     return(Task.Factory.StartNew(s => ((IMediaServiceOperations)s).RegenerateKeyAsync(resourceGroupName, mediaServiceName, regenerateKeyInput), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }