/// <summary> /// The List Storage Accounts operation lists the storage accounts /// available under the current subscription. (see /// http://msdn.microsoft.com/en-us/library/windowsazure/ee460787.aspx /// for more information) /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.Storage.IStorageAccountOperations. /// </param> /// <returns> /// The List Storage Accounts operation response. /// </returns> public static StorageAccountListResponse List(this IStorageAccountOperations operations) { try { return(operations.ListAsync().Result); } catch (AggregateException ex) { if (ex.InnerExceptions.Count > 1) { throw; } else { throw ex.InnerException; } } }
/// <summary> /// Lists all the storage accounts available under the subscription. /// Note that storage keys are not returned; use the ListKeys /// operation for this. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.Storage.IStorageAccountOperations. /// </param> /// <returns> /// The list storage accounts operation response. /// </returns> public static Task <StorageAccountListResponse> ListAsync(this IStorageAccountOperations operations) { return(operations.ListAsync(CancellationToken.None)); }