ServicePartitionClient<TCommunicationClient> Constructor
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Initializes a new instance of the ServicePartitionClient<TCommunicationClient> class that uses the specified communication client factory to create a client to talk to the service endpoint identified by the service uri, partitionkey, replica and listener arguments.
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)
Parameters
- communicationClientFactory
- ICommunicationClientFactory<TCommunicationClient>
Communication client factory
- serviceUri
- Uri
Name of the service
- partitionKey
- ServicePartitionKey
The partition key used to identify the partition within the service.
- targetReplicaSelector
- TargetReplicaSelector
Target replica information
- listenerName
- String
Listener in the replica to which the client should connect to
- retrySettings
- OperationRetrySettings
Retry policy for exceptions seen during communication