示例#1
0
        private List <TalkToSend> ToTalkList(List <Dictionary <string, string> > mapList)
        {
            List <TalkToSend> list = new List <TalkToSend>();

            foreach (var value in mapList)
            {
                TalkToSend talk = JsonConvert.DeserializeObject <TalkToSend>(JsonConvert.SerializeObject(value, serializerSetting), serializerSetting);
                list.Add(talk);
            }
            return(list);
        }
示例#2
0
 /// <summary>
 /// Check is talk after lastTalk.
 /// <para>If it is same, return false.</para>
 /// </summary>
 /// <param name="talk"></param>
 /// <param name="lastTalk"></param>
 /// <returns></returns>
 private bool IsAfter(TalkToSend talk, Talk lastTalk)
 {
     if (lastTalk != null)
     {
         if (talk.Day < lastTalk.Day)
         {
             return(false);
         }
         if (talk.Day == lastTalk.Day && talk.Idx <= lastTalk.Idx)
         {
             return(false);
         }
     }
     return(true);
 }
示例#3
0
 /// <summary>
 /// Check is talk after lastTalk.
 /// <para>If it is same, return false.</para>
 /// </summary>
 /// <param name="talk"></param>
 /// <param name="lastTalk"></param>
 /// <returns></returns>
 private bool IsAfter(TalkToSend talk, Talk lastTalk)
 {
     if (lastTalk != null)
     {
         if (talk.Day < lastTalk.Day)
         {
             return false;
         }
         if (talk.Day == lastTalk.Day && talk.Idx <= lastTalk.Idx)
         {
             return false;
         }
     }
     return true;
 }