Exemplo n.º 1
0
        /// <summary>
        /// 添加 (当score一样value一样时不插入)
        /// </summary>
        /// <param name="key"></param>
        /// <param name="value"></param>
        /// <param name="score"></param>
        /// <param name="isOverlap"></param>
        /// <returns></returns>
        public bool SortedSetAdd <T>(string key, T value, double score, bool isOverlap = false)
        {
            if (isOverlap)
            {
                SortedSetRemove <T>(key, value);
            }

            return(CsRedisHelper.ZAdd(key, (score, ConvertJson <T>(value))) > 0);
        }