/// <summary> /// Returns the description for the specified namespace. (see /// http://msdn.microsoft.com/en-us/library/windowsazure/dn140232.aspx /// for more information) /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.ServiceBus.INamespaceOperations. /// </param> /// <param name='namespaceName'> /// The namespace name. /// </param> /// <returns> /// The response to a request for a particular namespace. /// </returns> public static ServiceBusNamespaceResponse Get(this INamespaceOperations operations, string namespaceName) { try { return(operations.GetAsync(namespaceName).Result); } catch (AggregateException ex) { if (ex.InnerExceptions.Count > 1) { throw; } else { throw ex.InnerException; } } }
/// <summary> /// Returns the description for the specified namespace. (see /// http://msdn.microsoft.com/en-us/library/windowsazure/dn140232.aspx /// for more information) /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.ServiceBus.INamespaceOperations. /// </param> /// <param name='namespaceName'> /// The namespace name. /// </param> /// <returns> /// The response to a request for a particular namespace. /// </returns> public static Task <ServiceBusNamespaceResponse> GetAsync(this INamespaceOperations operations, string namespaceName) { return(operations.GetAsync(namespaceName, CancellationToken.None)); }
/// <summary> /// Returns the description for the specified namespace. (see /// http://msdn.microsoft.com/library/azure/dn140232.aspx for more /// information) /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.NotificationHubs.INamespaceOperations. /// </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 Get Namespace operation. /// </returns> public static Task <NamespaceGetResponse> GetAsync(this INamespaceOperations operations, string resourceGroupName, string namespaceName) { return(operations.GetAsync(resourceGroupName, namespaceName, CancellationToken.None)); }