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

XFEExtension

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

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

XFEstudio/XFEExtension

优化XUnit依赖框架的XFECode.RunTest方法,现可以配合X方法自动输出分析对象

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

代码差异

6 个文件 +25 -14
Modified XFEExtension.NetCore.Analyzer.Test/Program.cs +9 -3
@@ -1,19 +1,25 @@
1 1 using System.Diagnostics;
2 using XFEExtension.NetCore.StringExtension;
2 using XFEExtension.NetCore.XUnit;
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()
9 16 {
10 17 var testClass = new TestClass("测试名称", "测试描述哈哈", 59)
11 18 {
12 19 Tags = [["123", "321"], ["1234567", "7654321"]],
13 20 Enum = MyEnum.Test1
14 21 };
15 var process = Process.GetProcessById(13880);
16 process.X();
22 return testClass;
17 23 }
18 24 }
19 25 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 修复对象分析解析空对象的bug[3]
22 优化XUnit依赖框架的XFECode.RunTest方法,现可以配合X方法自动输出分析对象
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.3</Version>
35 <Version>2.8.4</Version>
36 36 <Authors>XFEstudio</Authors>
37 37 </PropertyGroup>
38 38
Modified XFEExtension.NetCore/XFEExtension/XFECode.cs +12 -6
@@ -349,9 +349,12 @@ public abstract class XFECode
349 349 if (result is not null)
350 350 {
351 351 Console.ForegroundColor = mainColor;
352 Console.Write("\t执行结果:");
353 Console.ForegroundColor = methodColor;
354 Console.Write(result);
352 Console.Write("\n\n执行结果:");
353 Console.ForegroundColor = ConsoleColor.Gray;
354 if (result.GetType().IsValueType)
355 Console.WriteLine($"{result}\n");
356 else
357 result.X(true, true, "执行结果");
355 358 }
356 359 Console.WriteLine();
357 360 Console.ForegroundColor = ConsoleColor.Black;
@@ -628,9 +631,12 @@ public abstract class XFECode
628 631 if (result is not null)
629 632 {
630 633 Console.ForegroundColor = mainColor;
631 Console.Write("\t执行结果:");
632 Console.ForegroundColor = methodColor;
633 Console.Write(result);
634 Console.Write("\n\n执行结果:");
635 Console.ForegroundColor = ConsoleColor.Gray;
636 if (result.GetType().IsValueType)
637 Console.WriteLine($"{result}\n");
638 else
639 result.X(true, true, "执行结果");
634 640 }
635 641 Console.WriteLine();
636 642 Console.ForegroundColor = ConsoleColor.Black;
Modified XFEExtension.NetCore/XFEExtension/XFEExtension.cs +1 -1
@@ -1,6 +1,6 @@
1 1 using System.Runtime.CompilerServices;
2 2
3 namespace XFEExtension.NetCore.XFECode;
3 namespace XFEExtension.NetCore.CodeExtension;
4 4
5 5 /// <summary>
6 6 /// 对代码整体书写习惯的拓展
Modified XFEExtension.NetCore/XFEExtension/XFEIntEnumerator.cs +1 -1
@@ -1,4 +1,4 @@
1 namespace XFEExtension.NetCore.XFECode;
1 namespace XFEExtension.NetCore.CodeExtension;
2 2
3 3 /// <summary>
4 4 /// XFE枚举器
Modified XFEExtension.NetCore/XFETransform/StringConverter/ObjectAnalyzer.cs +0 -1
@@ -45,7 +45,6 @@ public class ObjectAnalyzer : StringConverter
45 45 ┌────┬────────────────────────────
46 46 {OutPutSubObjects(objectInfo.SubObjects)}
47 47 └─────────────────────────────────
48
49 48 """;
50 49 }
51 50 else