Ejemplo n.º 1
0
        private static void PrintConnectionInfo(IVoicemailBoxActor voicemailBoxActor)
        {
            var actorProxy = voicemailBoxActor as IActorProxy;

            if (actorProxy != null)
            {
                ResolvedServicePartition rsp;
                if (actorProxy.ActorServicePartitionClient.TryGetLastResolvedServicePartition(out rsp))
                {
                    var endpoint = rsp.GetEndpoint();
                    Console.WriteLine();
                    Console.WriteLine(
                        @"Connected to a VoicemailBox of an actor {0} hosted by the replica of a {3} Service {1} listening at Address {2}",
                        actorProxy.ActorId,
                        rsp.ServiceName,
                        endpoint.Address,
                        endpoint.Role);
                }
                else
                {
                    Console.WriteLine();
                    Console.WriteLine(
                        @"Connecting to Voicemail box of an actor {0} hosted by the replica of Service {1}",
                        actorProxy.ActorId,
                        actorProxy.ActorServicePartitionClient.ServiceUri);
                }
            }
        }
Ejemplo n.º 2
0
        private static void PrintConnectionInfo(IVoicemailBoxActor voicemailBoxActor)
        {
            var actorProxy = voicemailBoxActor as IActorProxy;

            if (actorProxy != null)
            {
                ResolvedServicePartition rsp;
                if (actorProxy.ActorServicePartitionClient.TryGetLastResolvedServicePartition(out rsp))
                {
                    var endpoint = rsp.GetEndpoint();
                    Console.WriteLine();
                    Console.WriteLine(
                        @"Connected to a VoicemailBox of an actor {0} hosted by the replica of a {3} Service {1} listening at Address {2}",
                        actorProxy.ActorId,
                        rsp.ServiceName,
                        endpoint.Address,
                        endpoint.Role);
                }
                else
                {
                    Console.WriteLine();
                    Console.WriteLine(
                        @"Connecting to Voicemail box of an actor {0} hosted by the replica of Service {1}",
                        actorProxy.ActorId,
                        actorProxy.ActorServicePartitionClient.ServiceUri);
                }
            }
        }