你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

ServiceBusClient 构造函数

定义

重载

ServiceBusClient()

可用于模拟。

ServiceBusClient(String)

初始化 ServiceBusClient 类的新实例。

ServiceBusClient(String, TokenCredential)

初始化 ServiceBusClient 类的新实例。

ServiceBusClient(String, ServiceBusClientOptions)

初始化 ServiceBusClient 类的新实例。

ServiceBusClient(String, AzureNamedKeyCredential, ServiceBusClientOptions)

初始化 ServiceBusClient 类的新实例。

ServiceBusClient(String, AzureSasCredential, ServiceBusClientOptions)

初始化 ServiceBusClient 类的新实例。

ServiceBusClient(String, TokenCredential, ServiceBusClientOptions)

初始化 ServiceBusClient 类的新实例。

ServiceBusClient()

Source:
ServiceBusClient.cs
Source:
ServiceBusClient.cs

可用于模拟。

protected ServiceBusClient ();
Protected Sub New ()

适用于

ServiceBusClient(String)

Source:
ServiceBusClient.cs
Source:
ServiceBusClient.cs

初始化 ServiceBusClient 类的新实例。

public ServiceBusClient (string connectionString);
new Azure.Messaging.ServiceBus.ServiceBusClient : string -> Azure.Messaging.ServiceBus.ServiceBusClient
Public Sub New (connectionString As String)

参数

connectionString
String

用于连接到服务总线命名空间的连接字符串。

注解

如果连接字符串指定特定的实体名称,则对 CreateSender(String)CreateReceiver(String)CreateProcessor(String) 等的任何后续调用仍必须指定相同的实体名称。

连接字符串将识别并应用由Azure 门户填充的属性,例如 Endpoint、SharedAccessKeyName、SharedAccessKey 和 EntityPath。 其他值将被忽略;若要配置处理器,请使用 ServiceBusClientOptions

适用于

ServiceBusClient(String, TokenCredential)

Source:
ServiceBusClient.cs
Source:
ServiceBusClient.cs

初始化 ServiceBusClient 类的新实例。

public ServiceBusClient (string fullyQualifiedNamespace, Azure.Core.TokenCredential credential);
new Azure.Messaging.ServiceBus.ServiceBusClient : string * Azure.Core.TokenCredential -> Azure.Messaging.ServiceBus.ServiceBusClient
Public Sub New (fullyQualifiedNamespace As String, credential As TokenCredential)

参数

fullyQualifiedNamespace
String

要连接到的完全限定的服务总线命名空间。 这可能类似于 {yournamespace}.servicebus.windows.net

credential
TokenCredential

用于授权的 Azure 托管标识凭据。 访问控制可由服务总线命名空间指定。

适用于

ServiceBusClient(String, ServiceBusClientOptions)

Source:
ServiceBusClient.cs
Source:
ServiceBusClient.cs

初始化 ServiceBusClient 类的新实例。

public ServiceBusClient (string connectionString, Azure.Messaging.ServiceBus.ServiceBusClientOptions options);
new Azure.Messaging.ServiceBus.ServiceBusClient : string * Azure.Messaging.ServiceBus.ServiceBusClientOptions -> Azure.Messaging.ServiceBus.ServiceBusClient
Public Sub New (connectionString As String, options As ServiceBusClientOptions)

参数

connectionString
String

用于连接到服务总线命名空间的连接字符串。

注解

如果连接字符串指定特定的实体名称,则对 CreateSender(String)CreateReceiver(String)CreateProcessor(String) 等的任何后续调用仍必须指定相同的实体名称。

连接字符串将识别并应用由Azure 门户填充的属性,例如 Endpoint、SharedAccessKeyName、SharedAccessKey 和 EntityPath。 其他值将被忽略;若要配置处理器,请使用 ServiceBusClientOptions

适用于

ServiceBusClient(String, AzureNamedKeyCredential, ServiceBusClientOptions)

Source:
ServiceBusClient.cs
Source:
ServiceBusClient.cs

初始化 ServiceBusClient 类的新实例。

public ServiceBusClient (string fullyQualifiedNamespace, Azure.AzureNamedKeyCredential credential, Azure.Messaging.ServiceBus.ServiceBusClientOptions options = default);
new Azure.Messaging.ServiceBus.ServiceBusClient : string * Azure.AzureNamedKeyCredential * Azure.Messaging.ServiceBus.ServiceBusClientOptions -> Azure.Messaging.ServiceBus.ServiceBusClient
Public Sub New (fullyQualifiedNamespace As String, credential As AzureNamedKeyCredential, Optional options As ServiceBusClientOptions = Nothing)

参数

fullyQualifiedNamespace
String

要连接到的完全限定的服务总线命名空间。 这可能类似于 {yournamespace}.servicebus.windows.net

credential
AzureNamedKeyCredential

AzureNamedKeyCredential用于授权的 。 访问控制可由服务总线命名空间指定。

适用于

ServiceBusClient(String, AzureSasCredential, ServiceBusClientOptions)

Source:
ServiceBusClient.cs
Source:
ServiceBusClient.cs

初始化 ServiceBusClient 类的新实例。

public ServiceBusClient (string fullyQualifiedNamespace, Azure.AzureSasCredential credential, Azure.Messaging.ServiceBus.ServiceBusClientOptions options = default);
new Azure.Messaging.ServiceBus.ServiceBusClient : string * Azure.AzureSasCredential * Azure.Messaging.ServiceBus.ServiceBusClientOptions -> Azure.Messaging.ServiceBus.ServiceBusClient
Public Sub New (fullyQualifiedNamespace As String, credential As AzureSasCredential, Optional options As ServiceBusClientOptions = Nothing)

参数

fullyQualifiedNamespace
String

要连接到的完全限定的服务总线命名空间。 这可能类似于 {yournamespace}.servicebus.windows.net

credential
AzureSasCredential

AzureSasCredential用于授权的 。 访问控制可由服务总线命名空间指定。

适用于

ServiceBusClient(String, TokenCredential, ServiceBusClientOptions)

Source:
ServiceBusClient.cs
Source:
ServiceBusClient.cs

初始化 ServiceBusClient 类的新实例。

public ServiceBusClient (string fullyQualifiedNamespace, Azure.Core.TokenCredential credential, Azure.Messaging.ServiceBus.ServiceBusClientOptions options);
new Azure.Messaging.ServiceBus.ServiceBusClient : string * Azure.Core.TokenCredential * Azure.Messaging.ServiceBus.ServiceBusClientOptions -> Azure.Messaging.ServiceBus.ServiceBusClient
Public Sub New (fullyQualifiedNamespace As String, credential As TokenCredential, options As ServiceBusClientOptions)

参数

fullyQualifiedNamespace
String

要连接到的完全限定的服务总线命名空间。 这可能类似于 {yournamespace}.servicebus.windows.net

credential
TokenCredential

用于授权的 Azure 托管标识凭据。 访问控制可由服务总线命名空间指定。

适用于