123456789101112131415161718192021222324252627282930 |
- using ServiceStack.Redis;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace ToolsClassLibrary
- {
- public class RedisHelper
- {
- static RedisClient rc;
- public RedisHelper(string _ip, int _port, string _pwd, int _db)
- {
- if (rc == null)
- {
- rc = new RedisClient(_ip, _port, _pwd, _db);
- }
- }
- public List<string> GetRedisKeys()
- {
- return rc.GetAllKeys();
- }
- public IDictionary<string,double> GetRedisKeys(List<string> points)
- {
- return rc.GetAll<double>(points);
- }
- }
- }
|