Beispiel #1
0
 /// <summary>
 /// Synchronize the keys for a storage account to the 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='syncStorageKeysInput'>
 /// Properties needed to sycnronize the keys for a storage account to the
 /// Media Service.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <MediaService> SyncStorageKeysAsync(this IMediaServiceOperations operations, string resourceGroupName, string mediaServiceName, SyncStorageKeysInput syncStorageKeysInput, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.SyncStorageKeysWithHttpMessagesAsync(resourceGroupName, mediaServiceName, syncStorageKeysInput, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Beispiel #2
0
 /// <summary>
 /// Synchronize the keys for a storage account to the 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='syncStorageKeysInput'>
 /// Properties needed to sycnronize the keys for a storage account to the
 /// Media Service.
 /// </param>
 public static MediaService SyncStorageKeys(this IMediaServiceOperations operations, string resourceGroupName, string mediaServiceName, SyncStorageKeysInput syncStorageKeysInput)
 {
     return(Task.Factory.StartNew(s => ((IMediaServiceOperations)s).SyncStorageKeysAsync(resourceGroupName, mediaServiceName, syncStorageKeysInput), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }