private static void BuildandAddUsers(string message, ScheduledMessage scheduledMessage) { var messageDict = new PostBodyDictBuilder(message); foreach (var pair in messageDict.MessageDictionary) { Console.WriteLine(pair); } var user = new OooUser(messageDict.MessageDictionary["user_id"]); user.SetUsername(messageDict.MessageDictionary["user_name"]); scheduledMessage.ScheduledUsers.Add(user); }
private static void BuildandAddUsers(string message, ScheduledMessage scheduledMessage) { var messageDict = new PostBodyDictBuilder(message); foreach (var pair in messageDict.MessageDictionary) { Console.WriteLine(pair); } var user = new OooUser(messageDict.MessageDictionary["user_id"]); user.SetUsername(messageDict.MessageDictionary["user_name"]); if (messageDict.MessageDictionary["text"].Contains("return")) { scheduledMessage.RemoveScheduledUser(user); } scheduledMessage.AddScheduledUser(user); }