[fix]修正代码生成时对可空类型的识别。原来无法识别 public static Parameter? FindByID(Int32 id) ,因为返回类型带有问号,导致数据类重复生成FindByID。

This commit is contained in:
智能大石头 2024-12-25 09:30:58 +08:00
parent dfa337b6b5
commit 0567236068
2 changed files with 1 additions and 4 deletions

View File

@ -166,7 +166,7 @@ internal class MemberSection
var rs = new List<MemberSection>();
if (txt.IsNullOrEmpty()) return rs;
var reg = new Regex(@"([\w\<\>,]+)\s(\w+)\(([^\)]*)\)\s*(?://)*(?:{|=>)");
var reg = new Regex(@"([\w\<\>,\?]+)\s(\w+)\(([^\)]*)\)\s*(?://)*(?:{|=>)");
foreach (Match item in reg.Matches(txt))
{
var types = new List<String>();

View File

@ -1,10 +1,7 @@
using System.Collections;
using System.Runtime.Serialization;
using System.Xml.Serialization;
using NewLife;
using NewLife.Collections;
using NewLife.Data;
using NewLife.Model;
using NewLife.Reflection;
using XCode;