Example #1
0
    public bool IsNeedNotice(INoticeKey rKey, string flag = null)
    {
        NoticeStateContent content;

        if (cache.TryGetValue(rKey, out content))
        {
            return(content.complete && (!content.isRead || content.flag != flag));
        }
        return(false);
    }
Example #2
0
    public void SetNoticeReadState(INoticeKey rKey, string rFlag = null)
    {
        NoticeStateContent content;

        if (cache.TryGetValue(rKey, out content))
        {
            content.isRead = content.complete;
            content.flag   = rFlag;
        }
    }
Example #3
0
    public void SetNoticeState(INoticeKey rKey, bool rComplete)
    {
        NoticeStateContent content;

        if (cache.TryGetValue(rKey, out content))
        {
            content.complete = rComplete;
        }
        else
        {
            cache.Add(rKey, new NoticeStateContent {
                complete = rComplete
            });
        }
    }
Example #4
0
 public bool GetCacheRead(INoticeKey key)
 {
     if (cache.ContainsKey(key))
     {
         if (!cache[key].complete)
         {
             return(false);
         }
         if (!cache[key].isRead)
         {
             return(false);
         }
     }
     return(true);
 }