code/Athena0.0.1/common/Cache.Redis/RedisConfigInfo.cs
(开头部分) 4KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ServiceStack.Redis;
//项目名称:Athena标准开发框架
//版本:0.0.1
//开发团队成员:周庆 张婷婷 王露 陈祚松 艾美珍 张梦丽 胡凯雨 陈兰兰 夏萍萍 康文洋 易传佳
//模块及代码页功能描述:Redis的配置操作
//最后修改时间:2017-12-26
//修改日志:
namespace Athena.common.Cache.Redis
{
public sealed class RedisConfigInfo : ConfigurationSection
{
public static RedisConfigInfo GetConfig()
{
RedisConfigInfo section = (RedisConfigInfo)ConfigurationManager.GetSection("redisconfig");
return section;
}
public static RedisConfigInfo GetConfig(string sectionName)
{
RedisConfigInfo section = (RedisConfigInfo)ConfigurationManager.GetSection("redisconfig");
if (section == null)
throw new ConfigurationErrorsException("Section " + sectionName + " is not found.");
return section;
}
/// <summary>
/// 可写的Redis链接地址
/// </summary>
[ConfigurationProperty("WriteServerList", IsRequired = false)]
public string WriteServerList
{
get
{
return (string)base["WriteServerList"];
}
set
{
base["WriteServerList"] = value;
}
}
/// <summary>
/// 可读的Redis链接地址
/// </summary>
[ConfigurationProperty("ReadServerList", IsRequired = false)]
public string ReadServerList
{
get
{
return (string)base["ReadServerList"];
}
set
后面还有 95 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
