Azure service fabric 参与者WCF服务-使用WCF的客户端代码
我有一个使用WCF的演员服务:Azure service fabric 参与者WCF服务-使用WCF的客户端代码,azure-service-fabric,service-fabric-actor,Azure Service Fabric,Service Fabric Actor,我有一个使用WCF的演员服务: [assembly: WcfActorRemotingProvider(RemotingListener = RemotingListener.V2Listener, RemotingClient = RemotingClient.V2Client)] namespace Player.Interfaces { /// <summary> /// This interface defines the methods exposed by
[assembly: WcfActorRemotingProvider(RemotingListener = RemotingListener.V2Listener, RemotingClient = RemotingClient.V2Client)]
namespace Player.Interfaces
{
/// <summary>
/// This interface defines the methods exposed by an actor.
/// Clients use this interface to interact with the actor that implements it.
/// </summary>
public interface IPlayer : IActor
{
Task<bool> JoinGameAsync(ActorId gameId, string playerName);
Task<bool> MakeMoveAsync(ActorId gameId, int x, int y);
}
}
是否有Actor的WCF客户端代码的代码段
var player1 = ActorProxy.Create<IPlayer>(new ActorId("Player 1"), "fabric:/ActorWCFApplication");
var wcfRemotingClient = new WcfActorRemotingClientFactory(WcfUtility.CreateTcpClientBinding(), null,
servicePartitionResolver: partitionResolver);