Beispiel #1
0
        public DisplayNotice ShouldDisplayNotice(string sign, int theMonth)
        {
            var    redis      = _redisHelper.GetDatabase();
            string awardeeKey = string.Format(KEY_AWARDEE_NOTICE, theMonth);

            if (redis.KeyExists(awardeeKey))
            {
                if (!_redisHelper.SetContains(awardeeKey, sign))
                {
                    return(DisplayNotice.Awardee);
                }
            }

            string awardKey = string.Format(KEY_AWARD_NOTICE, theMonth);

            if (redis.KeyExists(awardKey))
            {
                if (!_redisHelper.SetContains(awardKey, sign))
                {
                    return(DisplayNotice.Award);
                }
            }

            return(DisplayNotice.None);
        }
Beispiel #2
0
        public bool HasLovedMotto(string uid, long mid)
        {
            var key = string.Format(KEY_USER_ALL_LOVED_MOTTOS_FMT, uid);

            return(_redisHelper.SetContains(key, mid.ToString()));
        }