public bool SendMessage(string username, string message) { User u = GetUserByName(username); if (u.Equals(NoUser)) { return(false); } return(SendMessage(u, message)); }
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; }
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); }