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

ServicePartitionClient<TCommunicationClient> 构造函数

定义

初始化 类的新实例,该类ServicePartitionClient<TCommunicationClient>使用指定的通信客户端工厂创建一个客户端,以与由服务 URI、partitionkey、副本 (replica) 和侦听器参数标识的服务终结点通信。

public ServicePartitionClient (Microsoft.ServiceFabric.Services.Communication.Client.ICommunicationClientFactory<TCommunicationClient> communicationClientFactory, Uri serviceUri, Microsoft.ServiceFabric.Services.Client.ServicePartitionKey partitionKey = default, Microsoft.ServiceFabric.Services.Communication.Client.TargetReplicaSelector targetReplicaSelector = Microsoft.ServiceFabric.Services.Communication.Client.TargetReplicaSelector.PrimaryReplica, string listenerName = default, Microsoft.ServiceFabric.Services.Communication.Client.OperationRetrySettings retrySettings = default);
new Microsoft.ServiceFabric.Services.Communication.Client.ServicePartitionClient<'CommunicationClient (requires 'CommunicationClient :> Microsoft.ServiceFabric.Services.Communication.Client.ICommunicationClient)> : Microsoft.ServiceFabric.Services.Communication.Client.ICommunicationClientFactory<'CommunicationClient (requires 'CommunicationClient :> Microsoft.ServiceFabric.Services.Communication.Client.ICommunicationClient)> * Uri * Microsoft.ServiceFabric.Services.Client.ServicePartitionKey * Microsoft.ServiceFabric.Services.Communication.Client.TargetReplicaSelector * string * Microsoft.ServiceFabric.Services.Communication.Client.OperationRetrySettings -> Microsoft.ServiceFabric.Services.Communication.Client.ServicePartitionClient<'CommunicationClient (requires 'CommunicationClient :> Microsoft.ServiceFabric.Services.Communication.Client.ICommunicationClient)>
Public Sub New (communicationClientFactory As ICommunicationClientFactory(Of TCommunicationClient), serviceUri As Uri, Optional partitionKey As ServicePartitionKey = Nothing, Optional targetReplicaSelector As TargetReplicaSelector = Microsoft.ServiceFabric.Services.Communication.Client.TargetReplicaSelector.PrimaryReplica, Optional listenerName As String = Nothing, Optional retrySettings As OperationRetrySettings = Nothing)

参数

communicationClientFactory
ICommunicationClientFactory<TCommunicationClient>

通信客户端工厂

serviceUri
Uri

服务名称

partitionKey
ServicePartitionKey

用于标识服务中的分区的分区键。

targetReplicaSelector
TargetReplicaSelector

目标副本 (replica) 信息

listenerName
String

客户端应连接到的副本 (replica) 中的侦听器

retrySettings
OperationRetrySettings

针对通信期间出现的异常的重试策略

适用于