/// <summary> /// Initializes a new instance of the ServiceBusManagementClient class. /// </summary> private ServiceBusManagementClient() : base() { this._namespaces = new NamespaceOperations(this); this._notificationHubs = new NotificationHubOperations(this); this._queues = new QueueOperations(this); this._relays = new RelayOperations(this); this._topics = new TopicOperations(this); this.HttpClient.Timeout = TimeSpan.FromSeconds(300); }
/// <summary> /// Initializes a new instance of the ServiceBusManagementClient class. /// </summary> /// <param name='httpClient'> /// The Http client /// </param> public ServiceBusManagementClient(HttpClient httpClient) : base(httpClient) { this._namespaces = new NamespaceOperations(this); this._notificationHubs = new NotificationHubOperations(this); this._queues = new QueueOperations(this); this._relays = new RelayOperations(this); this._topics = new TopicOperations(this); this._apiVersion = "2013-08-01"; this._longRunningOperationInitialTimeout = -1; this._longRunningOperationRetryTimeout = -1; this.HttpClient.Timeout = TimeSpan.FromSeconds(300); }
/// <summary> /// Gets the set of connection strings for a relay. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.ServiceBus.IRelayOperations. /// </param> /// <param name='namespaceName'> /// The namespace name. /// </param> /// <param name='relayName'> /// The relay name. /// </param> /// <returns> /// The set of connection details for a service bus entity. /// </returns> public static ServiceBusConnectionDetailsResponse GetConnectionDetails(this IRelayOperations operations, string namespaceName, string relayName) { try { return(operations.GetConnectionDetailsAsync(namespaceName, relayName).Result); } catch (AggregateException ex) { if (ex.InnerExceptions.Count > 1) { throw; } else { throw ex.InnerException; } } }
/// <summary> /// Gets the set of connection strings for a relay. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.ServiceBus.IRelayOperations. /// </param> /// <param name='namespaceName'> /// Required. The namespace name. /// </param> /// <param name='relayName'> /// Required. The relay name. /// </param> /// <returns> /// The set of connection details for a service bus entity. /// </returns> public static Task <ServiceBusConnectionDetailsResponse> GetConnectionDetailsAsync(this IRelayOperations operations, string namespaceName, string relayName) { return(operations.GetConnectionDetailsAsync(namespaceName, relayName, CancellationToken.None)); }