ActorProxyFactory.CreateActorProxy Method

Definition

Overloads

CreateActorProxy<TActorInterface>(Uri, ActorId, String)

Creates a proxy to the actor object that implements an actor interface.

CreateActorProxy<TActorInterface>(ActorId, String, String, String)

Creates a proxy to the actor object that implements an actor interface.

CreateActorProxy<TActorInterface>(Uri, ActorId, String)

Creates a proxy to the actor object that implements an actor interface.

public TActorInterface CreateActorProxy<TActorInterface> (Uri serviceUri, Microsoft.ServiceFabric.Actors.ActorId actorId, string listenerName = default) where TActorInterface : Microsoft.ServiceFabric.Actors.IActor;
abstract member CreateActorProxy : Uri * Microsoft.ServiceFabric.Actors.ActorId * string -> 'ActorInterface (requires 'ActorInterface :> Microsoft.ServiceFabric.Actors.IActor)
override this.CreateActorProxy : Uri * Microsoft.ServiceFabric.Actors.ActorId * string -> 'ActorInterface (requires 'ActorInterface :> Microsoft.ServiceFabric.Actors.IActor)
Public Function CreateActorProxy(Of TActorInterface As IActor) (serviceUri As Uri, actorId As ActorId, Optional listenerName As String = Nothing) As TActorInterface

Type Parameters

TActorInterface

The actor interface implemented by the remote actor object. The returned proxy object will implement this interface.

Parameters

serviceUri
Uri

Uri of the actor service.

actorId
ActorId

Actor Id of the proxy actor object. Methods called on this proxy will result in requests being sent to the actor with this id.

listenerName
String

By default an actor service has only one listener for clients to connect to and communicate with. However it is possible to configure an actor service with more than one listeners, the listenerName parameter specifies the name of the listener to connect to.

Returns

TActorInterface

An actor proxy object that implements IActorProxy and TActorInterface.

Implements

Applies to

CreateActorProxy<TActorInterface>(ActorId, String, String, String)

Creates a proxy to the actor object that implements an actor interface.

public TActorInterface CreateActorProxy<TActorInterface> (Microsoft.ServiceFabric.Actors.ActorId actorId, string applicationName = default, string serviceName = default, string listenerName = default) where TActorInterface : Microsoft.ServiceFabric.Actors.IActor;
abstract member CreateActorProxy : Microsoft.ServiceFabric.Actors.ActorId * string * string * string -> 'ActorInterface (requires 'ActorInterface :> Microsoft.ServiceFabric.Actors.IActor)
override this.CreateActorProxy : Microsoft.ServiceFabric.Actors.ActorId * string * string * string -> 'ActorInterface (requires 'ActorInterface :> Microsoft.ServiceFabric.Actors.IActor)
Public Function CreateActorProxy(Of TActorInterface As IActor) (actorId As ActorId, Optional applicationName As String = Nothing, Optional serviceName As String = Nothing, Optional listenerName As String = Nothing) As TActorInterface

Type Parameters

TActorInterface

The actor interface implemented by the remote actor object. The returned proxy object will implement this interface.

Parameters

actorId
ActorId

Actor Id of the proxy actor object. Methods called on this proxy will result in requests being sent to the actor with this id.

applicationName
String

Name of the Service Fabric application that contains the actor service hosting the actor objects. This parameter can be null if the client is running as part of that same Service Fabric application. For more information, see Remarks.

serviceName
String

Name of the Service Fabric service as configured by ActorServiceAttribute on the actor implementation. By default, the name of the service is derived from the name of the actor interface. However ActorServiceAttribute is required when an actor implements more than one actor interfaces or an actor interface derives from another actor interface as the determination of the serviceName cannot be made automatically.

listenerName
String

By default an actor service has only one listener for clients to connect to and communicate with. However it is possible to configure an actor service with more than one listeners, the listenerName parameter specifies the name of the listener to connect to.

Returns

TActorInterface

An actor proxy object that implements IActorProxy and TActorInterface.

Implements

Applies to