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

XFEExtension

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

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

XFEstudio/XFEExtension

fix-修复对象分析的部分bug

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

代码差异

3 个文件 +16 -13
Modified XFEExtension.NetCore.Analyzer.Test/Program.cs +3 -9
@@ -1,25 +1,19 @@
1 1 using System.Diagnostics;
2 using XFEExtension.NetCore.XUnit;
2 using XFEExtension.NetCore.StringExtension;
3 3
4 4 namespace XFEExtension.NetCore.Analyzer.Test;
5 5
6 6 internal class Program
7 7 {
8 8 public static void Main(string[] args)
9 {
10 XFECode.RunTest().Wait();
11 var process = Process.GetProcessById(13880);
12 //process.X();
13 }
14 [SMTest]
15 public static TestClass CreateTestClass()
16 9 {
17 10 var testClass = new TestClass("测试名称", "测试描述哈哈", 59)
18 11 {
19 12 Tags = [["123", "321"], ["1234567", "7654321"]],
20 13 Enum = MyEnum.Test1
21 14 };
22 return testClass;
15 var process = new Process();
16 process.X();
23 17 }
24 18 }
25 19 enum MyEnum
Modified XFEExtension.NetCore/XFEExtension.NetCore.csproj +2 -2
@@ -19,7 +19,7 @@
19 19 <PackageTags>XFE;拓展;GPT;Server;服务器;测试;XFEExtension</PackageTags>
20 20 <PackageReleaseNotes>## 调整
21 21
22 优化XUnit依赖框架的XFECode.RunTest方法,现可以配合X方法自动输出分析对象
22 修复对象分析的部分bug
23 23
24 24 ## 新增
25 25
@@ -32,7 +32,7 @@
32 32 <PackageRequireLicenseAcceptance>True</PackageRequireLicenseAcceptance>
33 33 <PackageLicenseFile>LICENSE</PackageLicenseFile>
34 34 <AssemblyOriginatorKeyFile>..\XFEstudio.pfx</AssemblyOriginatorKeyFile>
35 <Version>2.8.4</Version>
35 <Version>2.8.5</Version>
36 36 <Authors>XFEstudio</Authors>
37 37 </PropertyGroup>
38 38
Modified XFEExtension.NetCore/XFETransform/StringConverter/ObjectAnalyzer.cs +11 -2
@@ -38,7 +38,11 @@ public class ObjectAnalyzer : StringConverter
38 38 {
39 39 if (objectInfo.Layer == 0)
40 40 {
41 if (objectInfo.SubObjects?.Count > 0)
41 if(objectInfo.SubObjects == null)
42 {
43 outPutString += $"{AddObjectPlace(objectInfo)} {XFEConverter.OutPutTypeName(objectInfo.Type!)} {objectInfo.Name}: null";
44 }
45 else if (objectInfo.SubObjects?.Count > 0)
42 46 {
43 47 outPutString += $"""
44 48 {AddObjectPlace(objectInfo)} {XFEConverter.OutPutTypeName(objectInfo.Type!)} {objectInfo.Name}
@@ -49,7 +53,12 @@ public class ObjectAnalyzer : StringConverter
49 53 }
50 54 else
51 55 {
52 outPutString += $"{AddObjectPlace(objectInfo)} {XFEConverter.OutPutTypeName(objectInfo.Type!)} {objectInfo.Name}: null";
56 outPutString += $"""
57 {AddObjectPlace(objectInfo)} {XFEConverter.OutPutTypeName(objectInfo.Type!)} {objectInfo.Name}
58 ┌────┬────────────────────────────
59 │ └─无内容"
60 └─────────────────────────────────
61 """;
53 62 }
54 63 }
55 64 else