/// <summary>
 /// Enumerates the queues in the service namespace. The result is
 /// returned in pages, each containing up to 100 queues. If the
 /// namespace contains more than 100 queues, a feed is returned that
 /// contains the first page and a next link with the URI to view the
 /// next page of data.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/hh780759.asp
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.ServiceBus.IQueueOperations.
 /// </param>
 /// <param name='namespaceName'>
 /// The namespace name.
 /// </param>
 /// <returns>
 /// A response to a request for a list of queues.
 /// </returns>
 public static ServiceBusQueuesResponse List(this IQueueOperations operations, string namespaceName)
 {
     try
     {
         return(operations.ListAsync(namespaceName).Result);
     }
     catch (AggregateException ex)
     {
         if (ex.InnerExceptions.Count > 1)
         {
             throw;
         }
         else
         {
             throw ex.InnerException;
         }
     }
 }
示例#2
0
 /// <summary>
 /// Enumerates the queues in the service namespace. The result is
 /// returned in pages, each containing up to 100 queues. If the
 /// namespace contains more than 100 queues, a feed is returned that
 /// contains the first page and a next link with the URI to view the
 /// next page of data.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/hh780759.asp
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.ServiceBus.IQueueOperations.
 /// </param>
 /// <param name='namespaceName'>
 /// Required. The namespace name.
 /// </param>
 /// <returns>
 /// A response to a request for a list of queues.
 /// </returns>
 public static Task <ServiceBusQueuesResponse> ListAsync(this IQueueOperations operations, string namespaceName)
 {
     return(operations.ListAsync(namespaceName, CancellationToken.None));
 }
 /// <summary>
 /// Gets a list of all the queues under the specified storage account
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group within the user's subscription. The name is
 /// case insensitive.
 /// </param>
 /// <param name='accountName'>
 /// The name of the storage account within the specified resource group.
 /// Storage account names must be between 3 and 24 characters in length and use
 /// numbers and lower-case letters only.
 /// </param>
 /// <param name='maxpagesize'>
 /// Optional, a maximum number of queues that should be included in a list
 /// queue response
 /// </param>
 /// <param name='filter'>
 /// Optional, When specified, only the queues with a name starting with the
 /// given filter will be listed.
 /// </param>
 public static IPage <ListQueue> List(this IQueueOperations operations, string resourceGroupName, string accountName, string maxpagesize = default(string), string filter = default(string))
 {
     return(operations.ListAsync(resourceGroupName, accountName, maxpagesize, filter).GetAwaiter().GetResult());
 }