コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }