ServiceProxy.Create<TServiceInterface>(Uri, ServicePartitionKey, TargetReplicaSelector, String) Method

Definition

Creates a proxy to communicate to the specified service using the remoted interface TServiceInterface that the service implements. Interface that is being remotedUri of the Service.The Partition key that determines which service partition is responsible for handling requests from this service proxyDetermines which replica or instance of the service partition the client should connect to.This parameter is Optional if the service has a single communication listener. The endpoints from the service are of the form {"Endpoints":{"Listener1":"Endpoint1","Listener2":"Endpoint2" ...}}. When the service exposes multiple endpoints, this parameter identifies which of those endpoints to use for the remoting communication.

The proxy that implement the interface that is being remoted. The returned object also implement IServiceProxy interface.
public static TServiceInterface Create<TServiceInterface> (Uri serviceUri, Microsoft.ServiceFabric.Services.Client.ServicePartitionKey partitionKey = null, Microsoft.ServiceFabric.Services.Communication.Client.TargetReplicaSelector targetReplicaSelector = Microsoft.ServiceFabric.Services.Communication.Client.TargetReplicaSelector.PrimaryReplica, string listenerName = null) where TServiceInterface : Microsoft.ServiceFabric.Services.Remoting.IService;
static member Create : Uri * Microsoft.ServiceFabric.Services.Client.ServicePartitionKey * Microsoft.ServiceFabric.Services.Communication.Client.TargetReplicaSelector * string -> 'ServiceInterface (requires 'ServiceInterface :> Microsoft.ServiceFabric.Services.Remoting.IService)

Type Parameters

TServiceInterface

Parameters

serviceUri
Uri
partitionKey
ServicePartitionKey
targetReplicaSelector
TargetReplicaSelector
listenerName
String

Returns

TServiceInterface

Applies to