Exemple #1
0
 /// <summary>
 /// Lists the notification hubs associated with a namespace.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.ServiceBus.INotificationHubOperations.
 /// </param>
 /// <param name='namespaceName'>
 /// The namespace name.
 /// </param>
 /// <param name='notificationHubName'>
 /// The notification hub name.
 /// </param>
 /// <returns>
 /// The set of connection details for a service bus entity.
 /// </returns>
 public static ServiceBusConnectionDetailsResponse GetConnectionDetails(this INotificationHubOperations operations, string namespaceName, string notificationHubName)
 {
     try
     {
         return(operations.GetConnectionDetailsAsync(namespaceName, notificationHubName).Result);
     }
     catch (AggregateException ex)
     {
         if (ex.InnerExceptions.Count > 1)
         {
             throw;
         }
         else
         {
             throw ex.InnerException;
         }
     }
 }
Exemple #2
0
 /// <summary>
 /// Lists the notification hubs associated with a namespace.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.ServiceBus.INotificationHubOperations.
 /// </param>
 /// <param name='namespaceName'>
 /// The namespace name.
 /// </param>
 /// <param name='notificationHubName'>
 /// The notification hub name.
 /// </param>
 /// <returns>
 /// The set of connection details for a service bus entity.
 /// </returns>
 public static Task <ServiceBusConnectionDetailsResponse> GetConnectionDetailsAsync(this INotificationHubOperations operations, string namespaceName, string notificationHubName)
 {
     return(operations.GetConnectionDetailsAsync(namespaceName, notificationHubName, CancellationToken.None));
 }