Skip to content

Commit

Permalink
代码整理
Browse files Browse the repository at this point in the history
  • Loading branch information
nnhy committed Nov 28, 2024
1 parent af7b16f commit 2d9e22b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions XCode/Configuration/DbConfigProvider.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System.Security.Cryptography;
using NewLife;
using NewLife.Common;
using NewLife.Configuration;
using NewLife.Data;
using NewLife.Log;
Expand Down Expand Up @@ -31,6 +30,10 @@ public class DbConfigProvider : ConfigProvider

#region 方法
/// <summary>初始化提供者,如有必要,此时加载缓存文件</summary>
/// <remarks>
/// 大多数基于数据的配置(如魔方CubeSetting),默认配置提供者都是Xml,在静态构造函数里面执行的是Xml配置提供者的Init。
/// 后来基于数据库的配置提供者,再由LoadAll触发执行Init。
/// </remarks>
/// <param name="value"></param>
public override void Init(String? value)
{
Expand Down Expand Up @@ -93,7 +96,7 @@ public override void Init(String? value)
var list = Parameter.FindAllByUserID(UserId, Category);
foreach (var item in list)
{
if (!item.Enable) continue;
if (!item.Enable || item.Name.IsNullOrEmpty()) continue;

dic[item.Name] = item.Value;

Expand Down
2 changes: 1 addition & 1 deletion XCode/Membership/字典参数.Biz.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ static Parameter()
/// <summary>根据编号查找</summary>
/// <param name="id">编号</param>
/// <returns>实体对象</returns>
public static Parameter FindByID(Int32 id)
public static Parameter? FindByID(Int32 id)
{
if (id <= 0) return null;

Expand Down

0 comments on commit 2d9e22b

Please sign in to comment.