Skip to content

Commit

Permalink
修改Config.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffreySu committed Jun 2, 2018
1 parent 4460fff commit 0d426c6
Showing 1 changed file with 7 additions and 30 deletions.
37 changes: 7 additions & 30 deletions src/Senparc.Weixin/Senparc.Weixin/Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,42 +52,15 @@ namespace Senparc.Weixin
/// </summary>
public static class Config
{
private static bool _isDebug = false;//TODO:需要考虑分布式的情况,后期需要储存在缓存中

/// <summary>
/// 指定是否是Debug状态,如果是,系统会自动输出日志
/// </summary>
public static bool IsDebug
{
get
{
return _isDebug;
}
set
{
_isDebug = value;

//if (_isDebug)
//{
// WeixinTrace.Open();
//}
//else
//{
// WeixinTrace.Close();
//}
}
get { return CO2NET.Config.IsDebug; }
set { CO2NET.Config.IsDebug = value; }
}

/// <summary>
/// JavaScriptSerializer 类接受的 JSON 字符串的最大长度
/// </summary>
public static int MaxJsonLength = int.MaxValue;//TODO:需要考虑分布式的情况,后期需要储存在缓存中

/// <summary>
/// 默认缓存键的第一级命名空间,默认值:DefaultCache
/// </summary>
public static string DefaultCacheNamespace = "DefaultCache";//TODO:需要考虑分布式的情况,后期需要储存在缓存中,或进行全局配置

#if !NET45
/// <summary>
/// 默认微信配置
Expand All @@ -104,7 +77,11 @@ public static bool IsDebug
/// <summary>
/// 网站根目录绝对路径
/// </summary>
public static string RootDictionaryPath { get; set; }
public static string RootDictionaryPath
{
get { return CO2NET.Config.RootDictionaryPath; }
set { CO2NET.Config.RootDictionaryPath = value; }
}

#region API地址(前缀)设置

Expand Down

0 comments on commit 0d426c6

Please sign in to comment.