/// <summary> /// Gets the set of connection strings for a queue. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.ServiceBus.IQueueOperations. /// </param> /// <param name='namespaceName'> /// The namespace name. /// </param> /// <param name='queueName'> /// The queue name. /// </param> /// <returns> /// The set of connection details for a service bus entity. /// </returns> public static ServiceBusConnectionDetailsResponse GetConnectionDetails(this IQueueOperations operations, string namespaceName, string queueName) { try { return(operations.GetConnectionDetailsAsync(namespaceName, queueName).Result); } catch (AggregateException ex) { if (ex.InnerExceptions.Count > 1) { throw; } else { throw ex.InnerException; } } }
/// <summary> /// Gets the set of connection strings for a queue. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.ServiceBus.IQueueOperations. /// </param> /// <param name='namespaceName'> /// Required. The namespace name. /// </param> /// <param name='queueName'> /// Required. The queue name. /// </param> /// <returns> /// The set of connection details for a service bus entity. /// </returns> public static Task <ServiceBusConnectionDetailsResponse> GetConnectionDetailsAsync(this IQueueOperations operations, string namespaceName, string queueName) { return(operations.GetConnectionDetailsAsync(namespaceName, queueName, CancellationToken.None)); }