/// <summary>
 /// Enumerates the topics in the service namespace. An empty feed is
 /// returned if no topic exists in the service namespace.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/hh780744.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.ServiceBus.ITopicOperations.
 /// </param>
 /// <param name='namespaceName'>
 /// The namespace name.
 /// </param>
 /// <returns>
 /// A response to a request for a list of topics.
 /// </returns>
 public static ServiceBusTopicsResponse List(this ITopicOperations operations, string namespaceName)
 {
     try
     {
         return(operations.ListAsync(namespaceName).Result);
     }
     catch (AggregateException ex)
     {
         if (ex.InnerExceptions.Count > 1)
         {
             throw;
         }
         else
         {
             throw ex.InnerException;
         }
     }
 }
 /// <summary>
 /// Enumerates the topics in the service namespace. An empty feed is
 /// returned if no topic exists in the service namespace.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/hh780744.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>
 /// <returns>
 /// A response to a request for a list of topics.
 /// </returns>
 public static Task <ServiceBusTopicsResponse> ListAsync(this ITopicOperations operations, string namespaceName)
 {
     return(operations.ListAsync(namespaceName, CancellationToken.None));
 }