可配置引擎

This commit is contained in:
2024-11-30 08:36:04 +08:00
parent 71ec5da49a
commit 57ed90a3c3
12 changed files with 131 additions and 44 deletions
@@ -107,7 +107,8 @@ namespace AibisDream.Kit
{
try
{
res = JsonUtil.ReadBean<T>(path);
string formattedKey = JsonUtil.FormatAsJsonPath(path);
res = JsonUtil.ReadBean<T>(formattedKey);
return true;
}
catch (Exception e)
@@ -126,7 +127,8 @@ namespace AibisDream.Kit
/// <typeparam name="T"></typeparam>
public void SaveConfig<T>(T bean, string path)
{
JsonUtil.SaveBean(bean, path);
var jsonPath = JsonUtil.FormatAsJsonPath(path);
JsonUtil.SaveBean(bean, jsonPath);
}
/// <summary>