public override void Execute(int userID, DateTime instructDateTime, string datas)
        {
            MaxLabs.Passport.Proxy.DataForUpdateChatMessageCount counts = DataReadWrap.Get <MaxLabs.Passport.Proxy.DataForUpdateChatMessageCount>(datas);

            Dictionary <int, int> temp = new Dictionary <int, int>();

            for (int i = 0; i < counts.UserIDs.Count; i++)
            {
                temp.Add(counts.UserIDs[i], counts.MessageCounts[i]);
            }

            ChatBO.Instance.Client_UpdateUserUnReadMessageCount(temp);
        }
Exemple #2
0
        public static DataForUpdateChatMessageCount GetUserMessageCountProxy(Dictionary<int, int> counts)
        {
            DataForUpdateChatMessageCount proxy = new DataForUpdateChatMessageCount();

            proxy.UserIDs = new List<int>();
            proxy.MessageCounts = new List<int>();
            foreach (KeyValuePair<int, int> pair in counts)
            {
                proxy.UserIDs.Add(pair.Key);
                proxy.MessageCounts.Add(pair.Value);
            }

            return proxy;
        }