/// <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> /// A standard storage response including an HTTP status code and /// request ID. /// </returns> public static ServiceBusNotificationHubResponse Get(this INotificationHubOperations operations, string namespaceName, string notificationHubName) { try { return(operations.GetAsync(namespaceName, notificationHubName).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> /// <param name='notificationHubName'> /// The notification hub name. /// </param> /// <returns> /// A standard storage response including an HTTP status code and /// request ID. /// </returns> public static Task <ServiceBusNotificationHubResponse> GetAsync(this INotificationHubOperations operations, string namespaceName, string notificationHubName) { return(operations.GetAsync(namespaceName, notificationHubName, 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> /// <param name='notificationHubName'> /// Required. The notification hub name. /// </param> /// <returns> /// The response of the Get NotificationHub operation. /// </returns> public static Task <NotificationHubGetResponse> GetAsync(this INotificationHubOperations operations, string resourceGroupName, string namespaceName, string notificationHubName) { return(operations.GetAsync(resourceGroupName, namespaceName, notificationHubName, CancellationToken.None)); }