Example #1
0
        public bool SendMessage(string username, string message)
        {
            User u = GetUserByName(username);

            if (u.Equals(NoUser))
            {
                return(false);
            }

            return(SendMessage(u, message));
        }
Example #2
0
 public UserMessage[] GetMessagesSinceTime(User user, DateTime time)
 {
     UserMessage[] message = UserMessages.Where((m) => user.Equals(m.Recipient) && m.TimeSent <= time).ToArray();
     UserMessages.RemoveAll(u => message.Contains(u));
     return message;
 }
Example #3
0
 public UserMessage[] GetMessagesSinceTime(User user, DateTime time)
 {
     UserMessage[] message = UserMessages.Where((m) => user.Equals(m.Recipient) && m.TimeSent <= time).ToArray();
     UserMessages.RemoveAll(u => message.Contains(u));
     return(message);
 }