Share via


IServiceProxyFactory.CreateNonIServiceProxy<TServiceInterface> Method

Definition

Creates a proxy to communicate to the specified service using the remoted interface TServiceInterface that the service implements.

public TServiceInterface CreateNonIServiceProxy<TServiceInterface> (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);
abstract member CreateNonIServiceProxy : Uri * Microsoft.ServiceFabric.Services.Client.ServicePartitionKey * Microsoft.ServiceFabric.Services.Communication.Client.TargetReplicaSelector * string -> 'ServiceInterface
Public Function CreateNonIServiceProxy(Of TServiceInterface) (serviceUri As Uri, Optional partitionKey As ServicePartitionKey = Nothing, Optional targetReplicaSelector As TargetReplicaSelector = Microsoft.ServiceFabric.Services.Communication.Client.TargetReplicaSelector.PrimaryReplica, Optional listenerName As String = Nothing) As TServiceInterface

Type Parameters

TServiceInterface

Interface that is being remoted . Service Interface does not need to be inherited from IService.

Parameters

serviceUri
Uri

Uri of the Service.

partitionKey
ServicePartitionKey

The Partition key that determines which service partition is responsible for handling requests from this service proxy

targetReplicaSelector
TargetReplicaSelector

Determines which replica or instance of the service partition the client should connect to.

listenerName
String

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.

Returns

TServiceInterface

The proxy that implement the interface that is being remoted. The returned object also implement IServiceProxy interface.

Applies to