/// <summary> /// Initializes a new instance of the ServiceBusNamespace class. /// </summary> /// <param name="connectionStringType">The service bus namespace connection string type.</param> /// <param name="connectionString">The service bus namespace connection string.</param> /// <param name="uri">The full address of the service bus namespace.</param> /// <param name="ns">The service bus namespace.</param> /// <param name="issuerName">The issuer name of the shared secret credentials.</param> /// <param name="issuerSecret">The issuer secret of the shared secret credentials.</param> /// <param name="servicePath">The service path that follows the host name section of the URI.</param> /// <param name="transportType">The transport type to use to access the namespace.</param> public ServiceBusNamespace(ServiceBusNamespaceType connectionStringType, string connectionString, string uri, string ns, string servicePath, string issuerName, string issuerSecret, string transportType) { ConnectionStringType = connectionStringType; ConnectionString = connectionString; Uri = uri; if (string.IsNullOrEmpty(uri)) { Uri = ServiceBusEnvironment.CreateServiceUri(transportType, ns, servicePath).ToString(); } Namespace = ns; IssuerName = issuerName; IssuerSecret = issuerSecret; ServicePath = servicePath; TransportType = transportType; StsEndpoint = default(string); RuntimePort = default(string); ManagementPort = default(string); WindowsDomain = default(string); WindowsUserName = default(string); WindowsPassword = default(string); }
/// <summary> /// Initializes a new instance of the ServiceBusNamespace class. /// </summary> /// <param name="connectionStringType">The service bus namespace connection string type.</param> /// <param name="connectionString">The service bus namespace connection string.</param> /// <param name="uri">The full address of the service bus namespace.</param> /// <param name="ns">The service bus namespace.</param> /// <param name="name">The issuer name of the shared secret credentials.</param> /// <param name="key">The issuer secret of the shared secret credentials.</param> /// <param name="servicePath">The service path that follows the host name section of the URI.</param> /// <param name="stsEndpoint">The sts endpoint of the service bus namespace.</param> /// <param name="transportType">The transport type to use to access the namespace.</param> /// <param name="isSas">True is is SAS connection string, false otherwise.</param> /// <param name="entityPath">Entity path connection string scoped to. Otherwise a default.</param> public ServiceBusNamespace(ServiceBusNamespaceType connectionStringType, string connectionString, string uri, string ns, string servicePath, string name, string key, string stsEndpoint, TransportType transportType, bool isSas = false, string entityPath = "", bool isUserCreated = false) { ConnectionStringType = connectionStringType; Uri = string.IsNullOrWhiteSpace(uri) ? ServiceBusEnvironment.CreateServiceUri("sb", ns, servicePath).ToString() : uri; ConnectionString = ConnectionStringType == ServiceBusNamespaceType.Custom ? string.Format(ConnectionStringFormat, Uri, name, key, transportType) : connectionString; Namespace = ns; IssuerName = name; if (isSas) { SharedAccessKeyName = name; SharedAccessKey = key; } else { IssuerSecret = key; ServicePath = servicePath; } TransportType = transportType; StsEndpoint = stsEndpoint; RuntimePort = default(string); ManagementPort = default(string); WindowsDomain = default(string); WindowsUserName = default(string); WindowsPassword = default(string); EntityPath = entityPath; UserCreated = isUserCreated; }
/// <summary> /// Initializes a new instance of the ServiceBusNamespace class. /// </summary> /// <param name="connectionStringType">The service bus namespace connection string type.</param> /// <param name="connectionString">The service bus namespace connection string.</param> /// <param name="uri">The full address of the service bus namespace.</param> /// <param name="ns">The service bus namespace.</param> /// <param name="name">The issuer name of the shared secret credentials.</param> /// <param name="key">The issuer secret of the shared secret credentials.</param> /// <param name="servicePath">The service path that follows the host name section of the URI.</param> /// <param name="stsEndpoint">The sts endpoint of the service bus namespace.</param> /// <param name="transportType">The transport type to use to access the namespace.</param> /// <param name="isSas">True is is SAS connection string, false otherwise.</param> public ServiceBusNamespace(ServiceBusNamespaceType connectionStringType, string connectionString, string uri, string ns, string servicePath, string name, string key, string stsEndpoint, TransportType transportType, bool isSas = false) { ConnectionStringType = connectionStringType; Uri = string.IsNullOrWhiteSpace(uri) ? ServiceBusEnvironment.CreateServiceUri("sb", ns, servicePath).ToString() : uri; ConnectionString = ConnectionStringType == ServiceBusNamespaceType.Custom ? ConnectionString = string.Format(ConnectionStringFormat, Uri, name, key, transportType) : connectionString; Namespace = ns; IssuerName = name; if (isSas) { SharedAccessKeyName = name; SharedAccessKey = key; } else { IssuerSecret = key; ServicePath = servicePath; } TransportType = transportType; StsEndpoint = stsEndpoint; RuntimePort = default(string); ManagementPort = default(string); WindowsDomain = default(string); WindowsUserName = default(string); WindowsPassword = default(string); }