/// <summary>
 /// Updates a topic.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/jj839740.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.ServiceBus.ITopicOperations.
 /// </param>
 /// <param name='namespaceName'>
 /// The namespace name.
 /// </param>
 /// <param name='topic'>
 /// The Service Bus topic.
 /// </param>
 /// <returns>
 /// A response to a request for a particular topic.
 /// </returns>
 public static ServiceBusTopicResponse Update(this ITopicOperations operations, string namespaceName, ServiceBusTopic topic)
 {
     try
     {
         return(operations.UpdateAsync(namespaceName, topic).Result);
     }
     catch (AggregateException ex)
     {
         if (ex.InnerExceptions.Count > 1)
         {
             throw;
         }
         else
         {
             throw ex.InnerException;
         }
     }
 }
 /// <summary>
 /// Updates a topic.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/jj839740.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.ServiceBus.ITopicOperations.
 /// </param>
 /// <param name='namespaceName'>
 /// Required. The namespace name.
 /// </param>
 /// <param name='topic'>
 /// Required. The Service Bus topic.
 /// </param>
 /// <returns>
 /// A response to a request for a particular topic.
 /// </returns>
 public static Task <ServiceBusTopicResponse> UpdateAsync(this ITopicOperations operations, string namespaceName, ServiceBusTopic topic)
 {
     return(operations.UpdateAsync(namespaceName, topic, CancellationToken.None));
 }