/// <summary>
 /// Updates the queue description and makes a call to update
 /// corresponding DB entries.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/jj856305.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.ServiceBus.IQueueOperations.
 /// </param>
 /// <param name='namespaceName'>
 /// The namespace name.
 /// </param>
 /// <param name='queue'>
 /// The service bus queue.
 /// </param>
 /// <returns>
 /// A response to a request for a particular queue.
 /// </returns>
 public static ServiceBusQueueResponse Update(this IQueueOperations operations, string namespaceName, ServiceBusQueue queue)
 {
     try
     {
         return(operations.UpdateAsync(namespaceName, queue).Result);
     }
     catch (AggregateException ex)
     {
         if (ex.InnerExceptions.Count > 1)
         {
             throw;
         }
         else
         {
             throw ex.InnerException;
         }
     }
 }
Example #2
0
 /// <summary>
 /// Updates the queue description and makes a call to update
 /// corresponding DB entries.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/jj856305.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.ServiceBus.IQueueOperations.
 /// </param>
 /// <param name='namespaceName'>
 /// Required. The namespace name.
 /// </param>
 /// <param name='queue'>
 /// Required. The service bus queue.
 /// </param>
 /// <returns>
 /// A response to a request for a particular queue.
 /// </returns>
 public static Task <ServiceBusQueueResponse> UpdateAsync(this IQueueOperations operations, string namespaceName, ServiceBusQueue queue)
 {
     return(operations.UpdateAsync(namespaceName, queue, CancellationToken.None));
 }
 /// <summary>
 /// Creates a new queue with the specified queue name, under the specified
 /// 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='queueName'>
 /// A queue name must be unique within a storage account and must be between 3
 /// and 63 characters.The name must comprise of lowercase alphanumeric and
 /// dash(-) characters only, it should begin and end with an alphanumeric
 /// character and it cannot have two consecutive dash(-) characters.
 /// </param>
 /// <param name='metadata'>
 /// A name-value pair that represents queue metadata.
 /// </param>
 public static StorageQueue Update(this IQueueOperations operations, string resourceGroupName, string accountName, string queueName, IDictionary <string, string> metadata = default(IDictionary <string, string>))
 {
     return(operations.UpdateAsync(resourceGroupName, accountName, queueName, metadata).GetAwaiter().GetResult());
 }