XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

XFEExtension

【DLL】XFE各类拓展是一个C#的DLL库,旨在优化C#代码中常用语句的使用,并提供更简洁的访问方式,同时提供Xunit测试框架,快速搭建服务器/客户端,免费ChatGPTAPI接口,免费通讯服务器,XFE下载器,新增格式等

公开
关注 0 Fork 0 Star 0
返回提交历史

XFEstudio/XFEExtension

修复解析ObjectInfo的时候可能出现的错误

fe9e509
XFE工作室室长 <mail@xfegzs.com>
提交于

代码差异

1 个文件 +8 -1
Modified XFEExtension.NetCore/XFETransform/XFEConverter.cs +8 -1
@@ -94,7 +94,14 @@ public class XFEConverter
94 94 {
95 95 if (memberInfo is PropertyInfo propertyInfo)
96 96 {
97 subObjects.Add(GetObjectInfo(propertyInfo.Name, ObjectPlace.Property, layer + 1, propertyInfo.PropertyType, propertyInfo.GetValue(value), onlyProperty, onlyPublic));
97 try
98 {
99 subObjects.Add(GetObjectInfo(propertyInfo.Name, ObjectPlace.Property, layer + 1, propertyInfo.PropertyType, propertyInfo.GetValue(value), onlyProperty, onlyPublic));
100 }
101 catch (Exception ex)
102 {
103 subObjects.Add(GetObjectInfo(propertyInfo.Name, ObjectPlace.Property, layer + 1, propertyInfo.PropertyType, $"[获取失败:{ex.Message}]", onlyProperty, onlyPublic));
104 }
98 105 continue;
99 106 }
100 107 if (!onlyProperty && memberInfo is FieldInfo field)