private void OnAddNewFriendSuccesfully(AddFriendSuccesfully msg) { Context.ActorSelection("/user/Application/io/Out").Tell(msg); Become(Wait); Context.ActorSelection("/user/Application/io/In").Tell(new ReadUserInput()); }
private void OnAddFriendSuccesfully(AddFriendSuccesfully msg) { Console.WriteLine(); Console.ForegroundColor = ConsoleColor.Magenta; Console.Write("Hi "); Console.ForegroundColor = ConsoleColor.Green; Console.Write(msg.OwnerName); Console.ForegroundColor = ConsoleColor.Magenta; Console.Write(", I'm "); Console.ForegroundColor = ConsoleColor.Green; Console.Write(msg.FriendName); Console.ForegroundColor = ConsoleColor.Magenta; Console.WriteLine(". Nice to meet you!"); Console.ResetColor(); Console.WriteLine(); Console.WriteLine("Press any key to continue..."); }