123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace OASystem.RedisRepository.Config
- {
- internal class RedisClientConfig
- {
- //private static string _server = ConfigHelper.Get("RedisServer", "132.232.92.186");
- private static string _server = "132.232.92.186";
- /// <summary>
- /// 腾讯云Redis节点IP
- /// </summary>
- public static string Server
- {
- get { return _server; }
- set { _server = value; }
- }
- //private static int _port = ConfigHelper.Get("RedisPort", 6379);
- private static int _port = 6379;
- /// <summary>
- /// 节点端口
- /// </summary>
- public static int Port
- {
- get { return _port; }
- set { _port = value; }
- }
- //private static string _slaveServer = ConfigHelper.Get("SlaveServer", "132.232.92.186");
- private static string _slaveServer = "132.232.92.186";
- /// <summary>
- /// 节点IP
- /// </summary>
- public static string SlaveServer
- {
- get { return _slaveServer; }
- set { _slaveServer = value; }
- }
- //private static int _slavePort = ConfigHelper.Get("SlavePort", 6380);
- private static int _slavePort = 6380;
- /// <summary>
- /// 节点端口
- /// </summary>
- public static int SlavePort
- {
- get { return _slavePort; }
- set { _slavePort = value; }
- }
- //private static string _auth = ConfigHelper.Get("RedisAuth", "123456");
- private static string _auth = "123456";
- /// <summary>
- /// 节点密码
- /// </summary>
- public static string RedisAuth
- {
- get { return _auth; }
- set { _auth = value; }
- }
- //private static int _defaultDatabase = ConfigHelper.Get("RedisDataBase", 0);
- private static int _defaultDatabase = 0;
- /// <summary>
- /// redis默认0号库
- /// </summary>
- public static int DefaultDatabase
- {
- get { return _defaultDatabase; }
- set { _defaultDatabase = value; }
- }
- private static int _connectTimeout = 10000;
- public static int ConnectTimeout
- {
- get { return _connectTimeout; }
- set { _connectTimeout = value; }
- }
- private static int _connectRetry = 3;
- public static int ConnectRetry
- {
- get { return _connectRetry; }
- set { _connectRetry = value; }
- }
- private static bool _preserveAsyncOrder = false;
- public static bool PreserveAsyncOrder
- {
- get { return _preserveAsyncOrder; }
- set { _preserveAsyncOrder = value; }
- }
- }
- }
|