From eb680f11212089f33cef2b291d906a87a36b6d51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=9C=A8=E6=A3=AE=20=C2=B7=20=E4=BD=9C=E9=9C=96?= <16236903+NMSAzulX@users.noreply.github.com> Date: Wed, 13 Nov 2024 15:03:46 +0800 Subject: [PATCH] rerun publish --- CHANGELOG.md | 28 ++++++++++++------- samples/ExtensionSample/Program.cs | 4 ++- samples/HE/NET5.0/ConsoleSample/Program.cs | 2 +- .../Natasha.CSharp.HotExecutor.SG.csproj | 2 +- ...ha.CSharp.Extension.CompileDirector.csproj | 2 +- ...asha.CSharp.Extension.MethodCreator.csproj | 2 +- .../LogInfo/Utils/LogCheckHelper.cs | 10 +++---- .../LogInfo/Utils/LogCheckHelper.cs | 10 +++---- 8 files changed, 35 insertions(+), 25 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9b39897e..dd57f5c1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,16 +7,6 @@ Note: In this file, do not use the hard wrap in the middle of a sentence for com Example: -## [5.1.0.0] - 2023-04-02 - -### DotNetCore.Natasha.CSharp _ v5.1.0.0: -- Github 补充发布 Release. - -### DotNetCore.Natasha.Domain _ v5.0.0.0: -- Github 补充发布 Release. - ---> - ## [9.0.0.0] - 2024-11-13 ### DotNetCore.Natasha.CSharp.Compiler _ v9.0.0.0: @@ -64,3 +54,21 @@ Example: ### DotNetCore.Natasha.DynamicLoad.Base _ v9.0.0.0: - 跟随其他扩展库版本号发布. + +--> + +## [9.0.0.0] - 2024-11-13 + +### DotNetCore.Natasha.CSharp.Extension.MethodCreator _ v9.0.0.0: +- 发布 便捷动态方法编译模板. +- 跟随其他扩展库版本号发布. + +### DotNetCore.Natasha.CSharp.Extension.CompileDirector _ v9.0.0.0: +- 编译导演,每次编译学习并保留有用的 using code. +- 跟随其他扩展库版本号发布. +- +### DotNetCore.Natasha.CSharp.Extension.HotReload.SG _ v8.9.0.0: +- 热重载,允许程序在运行时更改代码,并输出新的结果. +- 跟随其他扩展库版本号发布. + + diff --git a/samples/ExtensionSample/Program.cs b/samples/ExtensionSample/Program.cs index fa1f4315..2ced90fe 100644 --- a/samples/ExtensionSample/Program.cs +++ b/samples/ExtensionSample/Program.cs @@ -88,6 +88,7 @@ static void Main(string[] args) Console.WriteLine(item.Name); } + //Once for (int i = 0; i < 5; i++) { @@ -95,7 +96,7 @@ static void Main(string[] args) Console.WriteLine(i); } - //Console.WriteLine(File.Exists("1.txt")); + Console.WriteLine(Class1.Get()); Console.WriteLine((new Class4()).ToString()); Console.WriteLine(JsonSerializer.Serialize(new Class3())); @@ -106,6 +107,7 @@ static void Main(string[] args) } + public static void TestShow() { Console.WriteLine(2); diff --git a/samples/HE/NET5.0/ConsoleSample/Program.cs b/samples/HE/NET5.0/ConsoleSample/Program.cs index 94131f64..453cfd17 100644 --- a/samples/HE/NET5.0/ConsoleSample/Program.cs +++ b/samples/HE/NET5.0/ConsoleSample/Program.cs @@ -10,6 +10,7 @@ internal class Program static void Main(string[] args) { + //HE:Async TestLocalMethod(); HEProxyState.Value += 1; @@ -18,7 +19,6 @@ static void Main(string[] args) //DS args[i] } - Console.WriteLine(HEProxyState.Value); CancellationTokenSource source = new(); diff --git a/src/Natasha.CSharp/Extension/HotExecutor/Natasha.CSharp.HotExecutor.SG/Natasha.CSharp.HotExecutor.SG.csproj b/src/Natasha.CSharp/Extension/HotExecutor/Natasha.CSharp.HotExecutor.SG/Natasha.CSharp.HotExecutor.SG.csproj index e469553a..01908118 100644 --- a/src/Natasha.CSharp/Extension/HotExecutor/Natasha.CSharp.HotExecutor.SG/Natasha.CSharp.HotExecutor.SG.csproj +++ b/src/Natasha.CSharp/Extension/HotExecutor/Natasha.CSharp.HotExecutor.SG/Natasha.CSharp.HotExecutor.SG.csproj @@ -1,7 +1,7 @@ - netstandard2.1 + netstandard2.1; DotNetCore.Natasha.CSharp.Extension.HotReload.SG true enable diff --git a/src/Natasha.CSharp/Extension/Natasha.CSharp.Extension.CompileDirector/Natasha.CSharp.Extension.CompileDirector.csproj b/src/Natasha.CSharp/Extension/Natasha.CSharp.Extension.CompileDirector/Natasha.CSharp.Extension.CompileDirector.csproj index 9a0901a0..e245da53 100644 --- a/src/Natasha.CSharp/Extension/Natasha.CSharp.Extension.CompileDirector/Natasha.CSharp.Extension.CompileDirector.csproj +++ b/src/Natasha.CSharp/Extension/Natasha.CSharp.Extension.CompileDirector/Natasha.CSharp.Extension.CompileDirector.csproj @@ -1,7 +1,7 @@  - netstandard2.0 + netstandard2.1; 编译导演,在编译场景中不断学习 using 使用情况。 DotNetCore.Natasha.CSharp.Extension.CompileDirector 升级到最新版. diff --git a/src/Natasha.CSharp/Extension/Natasha.CSharp.Extension.MethodCreator/Natasha.CSharp.Extension.MethodCreator.csproj b/src/Natasha.CSharp/Extension/Natasha.CSharp.Extension.MethodCreator/Natasha.CSharp.Extension.MethodCreator.csproj index 5bc6c382..0dc1194c 100644 --- a/src/Natasha.CSharp/Extension/Natasha.CSharp.Extension.MethodCreator/Natasha.CSharp.Extension.MethodCreator.csproj +++ b/src/Natasha.CSharp/Extension/Natasha.CSharp.Extension.MethodCreator/Natasha.CSharp.Extension.MethodCreator.csproj @@ -1,7 +1,7 @@  - netstandard2.0 + netstandard2.1; enable true Natasha 的快捷方法构建扩展. diff --git a/test/ut/Compile/MemAssembly/LogInfo/Utils/LogCheckHelper.cs b/test/ut/Compile/MemAssembly/LogInfo/Utils/LogCheckHelper.cs index 4102fe31..d284d9e3 100644 --- a/test/ut/Compile/MemAssembly/LogInfo/Utils/LogCheckHelper.cs +++ b/test/ut/Compile/MemAssembly/LogInfo/Utils/LogCheckHelper.cs @@ -48,10 +48,10 @@ internal static void JudgeLogError(string script, string fileName, bool withNull catch (Exception ex) { - var expectedLog = GetText(fileName); + var expectedLog = GetText(fileName).Replace("\r\n", "\n"); Assert.NotNull(log); Assert.True(ex is NatashaException); - var actualLog = log!.ToString(); + var actualLog = log!.ToString().Replace("\r\n", "\n"); CompareLogEqual(expectedLog, actualLog); } @@ -89,9 +89,9 @@ internal static void JudgeLogSuccess(string script, string fileName, bool withNu log = compilation.GetNatashaLog(); }; builder.GetAssembly(); - var expectedLog = GetText(fileName); + var expectedLog = GetText(fileName).Replace("\r\n", "\n"); Assert.NotNull(log); - var actualLog = log!.ToString(); + var actualLog = log!.ToString().Replace("\r\n", "\n"); CompareLogEqual(expectedLog, actualLog); } catch (Exception ex) @@ -102,7 +102,7 @@ internal static void JudgeLogSuccess(string script, string fileName, bool withNu } private static void CompareLogEqual(string expected, string actual) { - Assert.True(OSStringCompare.Equal(removeTime.Replace(expected, ""), removeTime.Replace(actual, ""))); + Assert.Equal(removeTime.Replace(expected, ""), removeTime.Replace(actual, "")); } private static string GetText(string fileName) diff --git a/test/ut/Compile/RefAssembly/LogInfo/Utils/LogCheckHelper.cs b/test/ut/Compile/RefAssembly/LogInfo/Utils/LogCheckHelper.cs index 03e165a6..3a9670a4 100644 --- a/test/ut/Compile/RefAssembly/LogInfo/Utils/LogCheckHelper.cs +++ b/test/ut/Compile/RefAssembly/LogInfo/Utils/LogCheckHelper.cs @@ -48,10 +48,10 @@ internal static void JudgeLogError(string script, string fileName, bool withNull catch (Exception ex) { - var expectedLog = GetText(fileName); + var expectedLog = GetText(fileName).Replace("\r\n", "\n"); Assert.NotNull(log); Assert.True(ex is NatashaException); - var actualLog = log!.ToString(); + var actualLog = log!.ToString().Replace("\r\n", "\n"); CompareLogEqual(expectedLog, actualLog); } @@ -89,9 +89,9 @@ internal static void JudgeLogSuccess(string script, string fileName, bool withNu log = compilation.GetNatashaLog(); }; builder.GetAssembly(); - var expectedLog = GetText(fileName); + var expectedLog = GetText(fileName).Replace("\r\n", "\n"); Assert.NotNull(log); - var actualLog = log!.ToString(); + var actualLog = log!.ToString().Replace("\r\n", "\n"); CompareLogEqual(expectedLog, actualLog); } catch (Exception ex) @@ -102,7 +102,7 @@ internal static void JudgeLogSuccess(string script, string fileName, bool withNu } private static void CompareLogEqual(string expected, string actual) { - Assert.True(OSStringCompare.Equal(removeTime.Replace(expected, ""), removeTime.Replace(actual, ""))); + Assert.Equal(removeTime.Replace(expected, ""), removeTime.Replace(actual, "")); } private static string GetText(string fileName)