Ejemplo n.º 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);
    }
Ejemplo n.º 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;
        }
    }
Ejemplo n.º 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
            });
        }
    }
Ejemplo n.º 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);
 }