/// <summary> /// The namespace description is an XML AtomPub document that defines /// the desired semantics for a service namespace. The namespace /// description contains the following properties. (see /// http://msdn.microsoft.com/en-us/library/windowsazure/jj873988.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> /// A response to a request for a list of namespaces. /// </returns> public static ServiceBusNamespaceDescriptionResponse GetNamespaceDescription(this INamespaceOperations operations, string namespaceName) { try { return(operations.GetNamespaceDescriptionAsync(namespaceName).Result); } catch (AggregateException ex) { if (ex.InnerExceptions.Count > 1) { throw; } else { throw ex.InnerException; } } }
/// <summary> /// The namespace description is an XML AtomPub document that defines /// the desired semantics for a service namespace. The namespace /// description contains the following properties. (see /// http://msdn.microsoft.com/en-us/library/windowsazure/jj873988.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> /// A response to a request for a list of namespaces. /// </returns> public static Task <ServiceBusNamespaceDescriptionResponse> GetNamespaceDescriptionAsync(this INamespaceOperations operations, string namespaceName) { return(operations.GetNamespaceDescriptionAsync(namespaceName, CancellationToken.None)); }