/// <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> /// <returns> /// A standard storage response including an HTTP status code and /// request ID. /// </returns> public static ServiceBusNotificationHubsResponse List(this INotificationHubOperations operations, string namespaceName) { try { return(operations.ListAsync(namespaceName).Result); } catch (AggregateException ex) { if (ex.InnerExceptions.Count > 1) { throw; } else { throw ex.InnerException; } } }
/// <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> /// <returns> /// A standard storage response including an HTTP status code and /// request ID. /// </returns> public static Task <ServiceBusNotificationHubsResponse> ListAsync(this INotificationHubOperations operations, string namespaceName) { return(operations.ListAsync(namespaceName, CancellationToken.None)); }
/// <summary> /// Lists the notification hubs associated with a namespace. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.NotificationHubs.INotificationHubOperations. /// </param> /// <param name='resourceGroupName'> /// Required. The name of the resource group. /// </param> /// <param name='namespaceName'> /// Required. The namespace name. /// </param> /// <returns> /// The response of the List NotificationHub operation. /// </returns> public static Task <NotificationHubListResponse> ListAsync(this INotificationHubOperations operations, string resourceGroupName, string namespaceName) { return(operations.ListAsync(resourceGroupName, namespaceName, CancellationToken.None)); }