ServiceBusNamespaceClient Constructor (Uri, TransportClientCredentialBase)
Initializes a new instance of the ServiceBusNamespaceClient class with the given service namespace URI base address and credentials.
Namespace: Microsoft.ServiceBus
Assembly: Microsoft.ServiceBus.Messaging (in Microsoft.ServiceBus.Messaging.dll)
Syntax
'Declaration
Public Sub New ( _
address As Uri, _
credential As TransportClientCredentialBase _
)
'Usage
Dim address As Uri
Dim credential As TransportClientCredentialBase
Dim instance As New ServiceBusNamespaceClient(address, _
credential)
public ServiceBusNamespaceClient(
Uri address,
TransportClientCredentialBase credential
)
public:
ServiceBusNamespaceClient(
Uri^ address,
TransportClientCredentialBase^ credential
)
new :
address:Uri *
credential:TransportClientCredentialBase -> ServiceBusNamespaceClient
public function ServiceBusNamespaceClient(
address : Uri,
credential : TransportClientCredentialBase
)
Parameters
- address
Type: System.Uri
The full URI address of the service namespace.
- credential
Type: Microsoft.ServiceBus.Description.TransportClientCredentialBase
The service namespace access credentials.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | address or credential is null. |
ArgumentOutOfRangeException | The type is not a supported Credential type. |
Remarks
Although you cannot include paths in the service namespace address, you can specify a credential that authorizes you to perform actions only on some sublevels of the base address. For example, it is not necessary that the credentials you specify be to the base address itself.
See Also
Reference
ServiceBusNamespaceClient Class
ServiceBusNamespaceClient Overload