/// <summary> /// 获取指定索引的集合 /// </summary> /// <typeparam name="T"></typeparam> /// <param name="key"></param> /// <param name="fromRank"></param> /// <param name="toRank"></param> /// <returns></returns> public List <T> GetRangeFromSortedSet <T>(string key, long fromRank, long toRank) { return(ConvertListObj <T>(Enumerable.ToList <string>(CsRedisHelper.ZRange(key, fromRank, toRank)))); }
/// <summary> /// 获取全部 /// </summary> /// <param name="key"></param> /// <param name="count"></param> /// <returns></returns> public List <T> SortedSetRangeByRank <T>(string key, long count = 1000) { return(ConvertListObj <T>(CsRedisHelper.ZRange(key, 0, count).ToList <string>())); }