Skip to content

Commit

Permalink
更新 EntityBuilder 基类及方法签名生成逻辑
Browse files Browse the repository at this point in the history
在 `EntityBuilder.cs` 文件中,`EntityBuilder` 类的基类从 `ClassBuilder` 变更为 `EntityBuilder`。在遍历 `columns` 集合并写入参数注释的代码块之后,新增了一行代码定义了一个名为 `nullable` 的变量,并将其赋值为 `EntityOption.Nullable`。修改了生成方法签名的代码行,将返回类型的类名后面添加了一个条件操作符 `?`,以根据 `nullable` 变量的值决定是否在类名后面添加 `?`。
  • Loading branch information
猿人易 committed Jul 9, 2024
1 parent 79fae26 commit 5ecb790
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion XCode/Code/EntityBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1627,8 +1627,10 @@ protected virtual Boolean BuildExtendFind(IDataColumn[] columns, Int32 index)
WriteLine("/// <param name=\"{0}\">{1}</param>", dc.CamelName(), dc.DisplayName);
}

var nullable = EntityOption.Nullable;

WriteLine("/// <returns>实体对象</returns>");
WriteLine("public static {2} {0}({1})", methodName, args, ClassName);
WriteLine("public static {2} {0}({1})", methodName, args, ClassName + (nullable ? "?" : ""));
WriteLine("{");
{
var header = false;
Expand Down

0 comments on commit 5ecb790

Please sign in to comment.