Skip to content

Commit

Permalink
- 修复 XML注释可能引起文件被锁报错的问题;
Browse files Browse the repository at this point in the history
  • Loading branch information
2881099 committed May 20, 2024
1 parent 8858262 commit bc85b9c
Show file tree
Hide file tree
Showing 4 changed files with 143 additions and 111 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ void LocalCompareEntityValueCollection(Type elementType, IEnumerable collectionB
if (dictAfter.ContainsKey(key) == false)
dictAfter.Add(key, item);
else if (key == "0" && table.Primarys.Length == 1 &&
new[] { typeof(long), typeof(long) }.Contains(table.Primarys[0].CsType))
new[] { typeof(long), typeof(int) }.Contains(table.Primarys[0].CsType))
tracking.InsertLog.Add(NativeTuple.Create(elementType, item));
}
else tracking.InsertLog.Add(NativeTuple.Create(elementType, item));
Expand Down
9 changes: 9 additions & 0 deletions FreeSql.DbContext/FreeSql.DbContext.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

233 changes: 124 additions & 109 deletions FreeSql/FreeSql.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 9 additions & 1 deletion FreeSql/Internal/CommonUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,15 @@ Dictionary<string, string> LocalGetComment(Type localType, int level)
}

var dic = new Dictionary<string, string>();
var sReader = new StringReader(File.ReadAllText(xmlPath));
StringReader sReader = null;
try
{
sReader = new StringReader(File.ReadAllText(xmlPath));
}
catch
{
return dic;
}
using (var xmlReader = XmlReader.Create(sReader))
{
XPathDocument xpath = null;
Expand Down

0 comments on commit bc85b9c

Please sign in to comment.