static void Main(string[] args)
        {
            ChatService.IChatService service = new ChatService.ChatServiceClient();

            Console.WriteLine("What is you're name?");
            String name = Console.ReadLine();


            Console.WriteLine("Loading messages...");

            ChatService.Message[] messages = service.GetMessages();
            PrintMessages(messages);

            String line = Console.ReadLine();
            while (!line.Equals("exit"))
            {
                ChatService.Message message = new ChatService.Message()
                {
                    Content = line,
                    User = name,
                };
                messages = service.SendMessage(message);
                PrintMessages(messages);
                line = Console.ReadLine();


            }
        }
Example #2
0
        static void Main(string[] args)
        {
            ChatService.IChatService service = new ChatService.ChatServiceClient();

            Console.WriteLine("Loading messages...");

            String[] messages =  service.GetMessages();
            PrintMessages(messages);

            String line = Console.ReadLine();
            while(!line.Equals("exit")){
                messages = service.SendMessage(line);
                PrintMessages(messages);
                line = Console.ReadLine();

            }
        }