Ejemplo n.º 1
0
        public void SetIsFirstMessageForDay(BaseMessageInfo previous)
        {
            if (previous != null)
            {
                DateTime dtCurrent  = (new DateTime(1970, 1, 1, 0, 0, 0, 0)).AddMilliseconds(CreatedAt).ToLocalTime();
                DateTime dtPrevious = (new DateTime(1970, 1, 1, 0, 0, 0, 0)).AddMilliseconds(previous.CreatedAt).ToLocalTime();

                if (dtCurrent.Year == dtPrevious.Year &&
                    dtCurrent.Month == dtPrevious.Month &&
                    dtCurrent.Day == dtPrevious.Day)
                {
                    IsFirstMessageForDay = false;
                }
                else
                {
                    IsFirstMessageForDay = true;
                }
            }
            else
            {
                IsFirstMessageForDay = true;
            }
        }
Ejemplo n.º 2
0
 public bool Equals(BaseMessageInfo info)
 {
     return(MessageId == info.MessageId);
 }