예제 #1
0
        private static PooledRedisClientManager CreateManager(string section)
        {
            RedisConfigInfo config = RedisConfigInfo.GetConfig(section);

            string[] array  = RedisPoolManager.SplitString(config.WriteServerList, ",");
            string[] array2 = RedisPoolManager.SplitString(config.ReadServerList, ",");
            for (int i = 0; i < array.Length; i++)
            {
                array[i] = config.RedisPassword + "@" + array[i];
            }
            for (int j = 0; j < array2.Length; j++)
            {
                array2[j] = config.RedisPassword + "@" + array2[j];
            }
            IEnumerable <string>     arg_B4_0 = array2;
            IEnumerable <string>     arg_B4_1 = array;
            RedisClientManagerConfig expr_7E  = new RedisClientManagerConfig();

            expr_7E.MaxWritePoolSize = (config.MaxWritePoolSize);
            expr_7E.MaxReadPoolSize  = (config.MaxReadPoolSize);
            expr_7E.AutoStart        = (config.AutoStart);
            expr_7E.DefaultDb        = (new long?((long)config.DefaultDb));
            return(new PooledRedisClientManager(arg_B4_0, arg_B4_1, expr_7E));
        }
예제 #2
0
 static RedisManager()
 {
     RedisManager.redisConfigInfo = RedisConfigInfo.GetConfig();
     RedisManager.CreateManager();
 }