예제 #1
0
        private static void Main(string[] args)
        {
            if (args.Length > 0)
            {
                for (;;)
                {
                    IHello friend = ActorProxy.Create <IHello>(ActorId.NewId(), ApplicationName);
                    Console.WriteLine(@"\n\nFrom Actor {1}: {0}\n\n", friend.SayHello("Good morning!").Result, friend.GetActorId());
                    Thread.Sleep(50);
                }
            }
            else
            {
                IHello friend = ActorProxy.Create <IHello>(ActorId.NewId(), ApplicationName);
                Console.WriteLine(@"\n\nFrom Actor {1}: {0}\n\n", friend.SayHello("Good morning!").Result, friend.GetActorId());
            }

            Console.WriteLine(@"Press enter to exit ...");
            Console.ReadLine();
        }