/// <summary>
 /// The List Media Services Account operation gets information about
 /// all existing media services accounts associated with the current
 /// subscription in Windows Azure.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/dn166989.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.MediaServices.IAccountOperations.
 /// </param>
 /// <returns>
 /// The List Media Accounts operation response.
 /// </returns>
 public static MediaServicesAccountListResponse List(this IAccountOperations operations)
 {
     try
     {
         return(operations.ListAsync().Result);
     }
     catch (AggregateException ex)
     {
         if (ex.InnerExceptions.Count > 1)
         {
             throw;
         }
         else
         {
             throw ex.InnerException;
         }
     }
 }
 /// <summary>
 /// The List Media Services Account operation gets information about
 /// all existing media services accounts associated with the current
 /// subscription in Windows Azure.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/dn166989.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.MediaServices.IAccountOperations.
 /// </param>
 /// <returns>
 /// The List Media Accounts operation response.
 /// </returns>
 public static Task <MediaServicesAccountListResponse> ListAsync(this IAccountOperations operations)
 {
     return(operations.ListAsync(CancellationToken.None));
 }
 /// <summary>
 /// The List operation gets information about the Batch accounts
 /// associated either with the subscription if no resource group is
 /// specified or within the specified resource group.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Batch.IAccountOperations.
 /// </param>
 /// <param name='parameters'>
 /// Optional. An optional argument which specifies the name of the
 /// resource group that constrains the set of accounts that are
 /// returned.
 /// </param>
 /// <returns>
 /// Values returned by the List operation.
 /// </returns>
 public static Task <BatchAccountListResponse> ListAsync(this IAccountOperations operations, AccountListParameters parameters)
 {
     return(operations.ListAsync(parameters, CancellationToken.None));
 }