Example #1
0
        public static void RunEventLoop(IChatService serviceClient)
        {
            string msg = string.Empty;

            switch (msg)
            {
            case "q":
                return;

            default:
                ClientConsole.SendMessage(serviceClient, "Message test");
                ClientConsole.PrintAllMessages(serviceClient);
                break;
            }
        }
Example #2
0
 private static void SendMessage(IChatService serviceClient, string sendMessage)
 {
     PrintSendMessage(sendMessage);
     ClientConsole.SendMessage(serviceClient, sendMessage);
 }
Example #3
0
 private static IEnumerable <ChatMessage> GetAllNewMessages(IChatService serviceClient,
                                                            DateTime lastMessageTimestamp)
 {
     return(ClientConsole.GetAllMessages(serviceClient)
            .SkipWhile(message => message.TimeStamp <= lastMessageTimestamp));
 }