From 5d8abc99f338d84550fb3200112acffd0156a5de Mon Sep 17 00:00:00 2001 From: Bagus Nur Listiyono Date: Sat, 23 Aug 2025 22:42:03 +0700 Subject: [PATCH 1/9] chore: Update .NET to exper7 Signed-off-by: Bagus Nur Listiyono --- Hi3Helper.Plugin.Core.csproj | 5 ++--- packages.lock.json | 20 ++++++++++---------- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/Hi3Helper.Plugin.Core.csproj b/Hi3Helper.Plugin.Core.csproj index a54344b..deb226b 100644 --- a/Hi3Helper.Plugin.Core.csproj +++ b/Hi3Helper.Plugin.Core.csproj @@ -1,7 +1,7 @@  - net9.0 + net10.0 disable true enable @@ -22,8 +22,7 @@ - - + diff --git a/packages.lock.json b/packages.lock.json index 2e13ef6..bfdea0d 100644 --- a/packages.lock.json +++ b/packages.lock.json @@ -1,26 +1,26 @@ { "version": 1, "dependencies": { - "net9.0": { + "net10.0": { "Microsoft.Extensions.Logging.Abstractions": { "type": "Direct", - "requested": "[9.0.8, )", - "resolved": "9.0.8", - "contentHash": "pYnAffJL7ARD/HCnnPvnFKSIHnTSmWz84WIlT9tPeQ4lHNiu0Az7N/8itihWvcF8sT+VVD5lq8V+ckMzu4SbOw==", + "requested": "[10.0.0-preview.7.25380.108, )", + "resolved": "10.0.0-preview.7.25380.108", + "contentHash": "qfx62EG7wvjym/GusNX+kzqPByIVYiXyqBYaObQlIch5YukiVd4ovUJHALYt11jpcxpv9nmjgmqahIluf2j5xA==", "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "9.0.8" + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.0-preview.7.25380.108" } }, "Microsoft.NET.ILLink.Tasks": { "type": "Direct", - "requested": "[9.0.8, )", - "resolved": "9.0.8", - "contentHash": "rd1CbIsMtVPtZNTIVD6Xydue//klYOOQIDpRgu3BHtv17AlpRs74/6QFbcYgMm/jL+naVU2T3OFLxVSLV5lQLQ==" + "requested": "[10.0.0-preview.7.25380.108, )", + "resolved": "10.0.0-preview.7.25380.108", + "contentHash": "YfGJxYNPgM+Kekl7o1W/UR3pSBgZ8ZtTdbQgu2Vf8WfTolNG3fVHFdxU8NzNaio4DzwmGLldEEL9IzvQOLE3SQ==" }, "Microsoft.Extensions.DependencyInjection.Abstractions": { "type": "Transitive", - "resolved": "9.0.8", - "contentHash": "xY3lTjj4+ZYmiKIkyWitddrp1uL5uYiweQjqo4BKBw01ZC4HhcfgLghDpPZcUlppgWAFqFy9SgkiYWOMx365pw==" + "resolved": "10.0.0-preview.7.25380.108", + "contentHash": "0oSQ8o2O8eMxaInqR1GykEzzlerBTN3xQMsEtaWA4zbf1LmrqV7H9ctTTjK4oMeWMCTb9mfYoN9fsVWbAhkTXA==" } } } From 3dbb562c6ef39810ab256369528845ba0cd8b9f8 Mon Sep 17 00:00:00 2001 From: Bagus Nur Listiyono Date: Mon, 20 Oct 2025 02:26:41 +0700 Subject: [PATCH 2/9] Update package/plj --- Hi3Helper.Plugin.Core.csproj | 2 +- packages.lock.json | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Hi3Helper.Plugin.Core.csproj b/Hi3Helper.Plugin.Core.csproj index b266598..ffb9bf4 100644 --- a/Hi3Helper.Plugin.Core.csproj +++ b/Hi3Helper.Plugin.Core.csproj @@ -22,7 +22,7 @@ - + diff --git a/packages.lock.json b/packages.lock.json index bfdea0d..22bb60f 100644 --- a/packages.lock.json +++ b/packages.lock.json @@ -4,23 +4,23 @@ "net10.0": { "Microsoft.Extensions.Logging.Abstractions": { "type": "Direct", - "requested": "[10.0.0-preview.7.25380.108, )", - "resolved": "10.0.0-preview.7.25380.108", - "contentHash": "qfx62EG7wvjym/GusNX+kzqPByIVYiXyqBYaObQlIch5YukiVd4ovUJHALYt11jpcxpv9nmjgmqahIluf2j5xA==", + "requested": "[10.0.0-rc.2.25502.107, )", + "resolved": "10.0.0-rc.2.25502.107", + "contentHash": "SKKKZjyCpBaDQ7yuFjdk6ELnRBRWeZsbnzUfo59Wc4PGhgf92chE3we/QlT6nk6NqlWcUgH/jogM+B/uq/Qdnw==", "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.0-preview.7.25380.108" + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.0-rc.2.25502.107" } }, "Microsoft.NET.ILLink.Tasks": { "type": "Direct", - "requested": "[10.0.0-preview.7.25380.108, )", - "resolved": "10.0.0-preview.7.25380.108", - "contentHash": "YfGJxYNPgM+Kekl7o1W/UR3pSBgZ8ZtTdbQgu2Vf8WfTolNG3fVHFdxU8NzNaio4DzwmGLldEEL9IzvQOLE3SQ==" + "requested": "[10.0.0-rc.2.25502.107, )", + "resolved": "10.0.0-rc.2.25502.107", + "contentHash": "31DsUbLGwks+cdV++WjVY17hq0Dx21KA/F5MQRhBHSgpxFsdEXIJLIe3+2nzH9ZlDtAYR5qhQV5Abm+CIdvdzw==" }, "Microsoft.Extensions.DependencyInjection.Abstractions": { "type": "Transitive", - "resolved": "10.0.0-preview.7.25380.108", - "contentHash": "0oSQ8o2O8eMxaInqR1GykEzzlerBTN3xQMsEtaWA4zbf1LmrqV7H9ctTTjK4oMeWMCTb9mfYoN9fsVWbAhkTXA==" + "resolved": "10.0.0-rc.2.25502.107", + "contentHash": "8jujunpkNNfTkE9PFHp9/aD6GPKVfNCuz8tUbzOcyU5tQOCoIZId4hwQNVx3Tb8XEWw9BYdh0k5vPpqdCM+UtA==" } } } From f970612e543dbb7f37e567413341f9bf3cc7daf2 Mon Sep 17 00:00:00 2001 From: Gabriel Lima <44784408+gablm@users.noreply.github.com> Date: Fri, 7 Nov 2025 18:59:06 +0000 Subject: [PATCH 3/9] Add profile for DNA to launch settings --- PluginTest/Properties/launchSettings.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/PluginTest/Properties/launchSettings.json b/PluginTest/Properties/launchSettings.json index 548bb82..b07631c 100644 --- a/PluginTest/Properties/launchSettings.json +++ b/PluginTest/Properties/launchSettings.json @@ -9,6 +9,11 @@ "commandName": "Project", "commandLineArgs": "NoWait \"H:\\myGit\\Hi3Helper.Plugin.HBR\\Hi3Helper.Plugin.HBR\\publish\\Debug\\main.dll\"", "nativeDebugging": true + }, + "PluginTest - DNA": { + "commandName": "Project", + "commandLineArgs": "NoWait \"D:\\GitHub\\Hi3Helper.Plugin.DNA\\Hi3Helper.Plugin.DNA\\publish\\Debug\\DNAbyss.dll\"", + "nativeDebugging": true } } } \ No newline at end of file From 416c2ba2f16f59aee793d5ad8eb98b05819e9cf7 Mon Sep 17 00:00:00 2001 From: Kemal Setya Adhi Date: Sat, 15 Nov 2025 00:09:13 +0700 Subject: [PATCH 4/9] Update NuGet to .NET 10 GA --- Hi3Helper.Plugin.Core.csproj | 2 +- packages.lock.json | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Hi3Helper.Plugin.Core.csproj b/Hi3Helper.Plugin.Core.csproj index ffb9bf4..d7719bb 100644 --- a/Hi3Helper.Plugin.Core.csproj +++ b/Hi3Helper.Plugin.Core.csproj @@ -22,7 +22,7 @@ - + diff --git a/packages.lock.json b/packages.lock.json index 22bb60f..981bd79 100644 --- a/packages.lock.json +++ b/packages.lock.json @@ -4,23 +4,23 @@ "net10.0": { "Microsoft.Extensions.Logging.Abstractions": { "type": "Direct", - "requested": "[10.0.0-rc.2.25502.107, )", - "resolved": "10.0.0-rc.2.25502.107", - "contentHash": "SKKKZjyCpBaDQ7yuFjdk6ELnRBRWeZsbnzUfo59Wc4PGhgf92chE3we/QlT6nk6NqlWcUgH/jogM+B/uq/Qdnw==", + "requested": "[10.0.0, )", + "resolved": "10.0.0", + "contentHash": "FU/IfjDfwaMuKr414SSQNTIti/69bHEMb+QKrskRb26oVqpx3lNFXMjs/RC9ZUuhBhcwDM2BwOgoMw+PZ+beqQ==", "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.0-rc.2.25502.107" + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.0" } }, "Microsoft.NET.ILLink.Tasks": { "type": "Direct", - "requested": "[10.0.0-rc.2.25502.107, )", - "resolved": "10.0.0-rc.2.25502.107", - "contentHash": "31DsUbLGwks+cdV++WjVY17hq0Dx21KA/F5MQRhBHSgpxFsdEXIJLIe3+2nzH9ZlDtAYR5qhQV5Abm+CIdvdzw==" + "requested": "[10.0.0, )", + "resolved": "10.0.0", + "contentHash": "kICGrGYEzCNI3wPzfEXcwNHgTvlvVn9yJDhSdRK+oZQy4jvYH529u7O0xf5ocQKzOMjfS07+3z9PKRIjrFMJDA==" }, "Microsoft.Extensions.DependencyInjection.Abstractions": { "type": "Transitive", - "resolved": "10.0.0-rc.2.25502.107", - "contentHash": "8jujunpkNNfTkE9PFHp9/aD6GPKVfNCuz8tUbzOcyU5tQOCoIZId4hwQNVx3Tb8XEWw9BYdh0k5vPpqdCM+UtA==" + "resolved": "10.0.0", + "contentHash": "L3AdmZ1WOK4XXT5YFPEwyt0ep6l8lGIPs7F5OOBZc77Zqeo01Of7XXICy47628sdVl0v/owxYJTe86DTgFwKCA==" } } } From c7d7e437087592de5574a3bc681e522c556340c7 Mon Sep 17 00:00:00 2001 From: Kemal Setya Adhi Date: Sun, 16 Nov 2025 15:55:23 +0700 Subject: [PATCH 5/9] Add <= and >= operator on GameVersion for .NET 10 Also reducing stackalloc size from 64 to 32 bytes in ToString() method --- Management/GameVersion.cs | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/Management/GameVersion.cs b/Management/GameVersion.cs index de1f935..8f2deb2 100644 --- a/Management/GameVersion.cs +++ b/Management/GameVersion.cs @@ -117,13 +117,10 @@ public readonly GameVersion GetIncrementedVersion() /// A string representation of . public readonly string ToString(string? format, IFormatProvider? formatProvider = null) { - Span writeStackalloc = stackalloc char[64]; - if (!TryFormat(writeStackalloc, out int written, format, formatProvider)) - { - throw new InvalidOperationException("Cannot write string to stackalloc buffer!"); - } - - return new string(writeStackalloc[..written]); + scoped Span writeStackalloc = stackalloc char[32]; + return !TryFormat(writeStackalloc, out int written, format, formatProvider) + ? throw new InvalidOperationException("Cannot write string to stackalloc buffer!") + : new string(writeStackalloc[..written]); } public static bool operator <(GameVersion? left, GameVersion? right) => @@ -136,6 +133,14 @@ public readonly string ToString(string? format, IFormatProvider? formatProvider public static bool operator >(GameVersion? left, GameVersion? right) => right < left; +#if NET10_0_OR_GREATER + public static bool operator <=(GameVersion? left, GameVersion? right) => + left < right || left == right; + + public static bool operator >=(GameVersion? left, GameVersion? right) => + right < left || right == left; +#endif + public static bool operator ==(GameVersion? left, GameVersion? right) => left.HasValue && right.HasValue && left.Value.Major == right.Value.Major && From 6ebfbf947761ec47b9d24a6e4f85224d25951be0 Mon Sep 17 00:00:00 2001 From: Kemal Setya Adhi Date: Sun, 16 Nov 2025 15:59:03 +0700 Subject: [PATCH 6/9] Make constant on GameVersion.TryFormatBytes style compare bittably equal --- Management/GameVersion.cs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Management/GameVersion.cs b/Management/GameVersion.cs index 8f2deb2..b44f768 100644 --- a/Management/GameVersion.cs +++ b/Management/GameVersion.cs @@ -347,12 +347,16 @@ public readonly bool TryFormat(Span destination, out int charsWritten, Rea /// public readonly bool TryFormat(Span utf8Destination, out int bytesWritten, ReadOnlySpan format, IFormatProvider? provider) { + const byte formatByteS = (byte)'s'; + const byte formatByteF = (byte)'f'; + const byte formatByteN = (byte)'n'; + bytesWritten = 0; - bool isUseAutoFormat = !format.IsEmpty && (format[0] | 0x20) == 's'; // This compares both 's' or 'S' as true. - bool isForceUseFullFormat = !format.IsEmpty && (format[0] | 0x20) == 'f'; // This compares both 'f' or 'F' as false. + bool isUseAutoFormat = !format.IsEmpty && (format[0] | 0x20) == formatByteS; // This compares both 's' or 'S' as true. + bool isForceUseFullFormat = !format.IsEmpty && (format[0] | 0x20) == formatByteF; // This compares both 'f' or 'F' as false. bool isUseMiniFormat = !isForceUseFullFormat && - (!format.IsEmpty && (format[0] | 0x20) == 'n' // This compares both 'n' or 'N' as true. + (!format.IsEmpty && (format[0] | 0x20) == formatByteN // This compares both 'n' or 'N' as true. || Revision == 0); if (utf8Destination.Length < 4) From 17532d1d62e5d860e6f86b924bcfae207f1fbb14 Mon Sep 17 00:00:00 2001 From: CryoTechnic Date: Mon, 17 Nov 2025 18:22:40 -0500 Subject: [PATCH 7/9] Update PLJ for net10 & PluginTest project --- PluginTest/PluginTest.csproj | 4 ++-- packages.lock.json | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/PluginTest/PluginTest.csproj b/PluginTest/PluginTest.csproj index 68138da..fc62829 100644 --- a/PluginTest/PluginTest.csproj +++ b/PluginTest/PluginTest.csproj @@ -2,7 +2,7 @@ Exe - net9.0 + net10.0 disable enable true @@ -13,7 +13,7 @@ - + diff --git a/packages.lock.json b/packages.lock.json index 981bd79..e3f310f 100644 --- a/packages.lock.json +++ b/packages.lock.json @@ -2,6 +2,12 @@ "version": 1, "dependencies": { "net10.0": { + "Microsoft.DotNet.ILCompiler": { + "type": "Direct", + "requested": "[10.0.0, )", + "resolved": "10.0.0", + "contentHash": "f9u8fMRROe2lS5MOOLutK6iSNTK9pC3kqd90FIn8Sk29fbZ0QDjZrBbwUkhouk/8dppC71SIEQaag0lGRTxvfA==" + }, "Microsoft.Extensions.Logging.Abstractions": { "type": "Direct", "requested": "[10.0.0, )", From 27961c580c78e2a9986083899f19c1f604c86fc2 Mon Sep 17 00:00:00 2001 From: Kemal Setya Adhi Date: Sun, 30 Nov 2025 14:22:52 +0700 Subject: [PATCH 8/9] Make comparison clear on GameVersion.TryFormat --- Management/GameVersion.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Management/GameVersion.cs b/Management/GameVersion.cs index b44f768..bc0a900 100644 --- a/Management/GameVersion.cs +++ b/Management/GameVersion.cs @@ -259,7 +259,7 @@ public readonly bool TryFormat(Span destination, out int charsWritten, Rea bool isUseAutoFormat = !format.IsEmpty && (format[0] | 0x20) == 's'; // This compares both 's' or 'S' as true. bool isForceUseFullFormat = !format.IsEmpty && (format[0] | 0x20) == 'f'; // This compares both 'f' or 'F' as false. bool isUseMiniFormat = !isForceUseFullFormat && - (!format.IsEmpty && (format[0] | 0x20) == 'n' // This compares both 'n' or 'N' as true. + ((!format.IsEmpty && (format[0] | 0x20) == 'n') // This compares both 'n' or 'N' as true. || Revision == 0); if (destination.Length < 4) @@ -356,7 +356,7 @@ public readonly bool TryFormat(Span utf8Destination, out int bytesWritten, bool isUseAutoFormat = !format.IsEmpty && (format[0] | 0x20) == formatByteS; // This compares both 's' or 'S' as true. bool isForceUseFullFormat = !format.IsEmpty && (format[0] | 0x20) == formatByteF; // This compares both 'f' or 'F' as false. bool isUseMiniFormat = !isForceUseFullFormat && - (!format.IsEmpty && (format[0] | 0x20) == formatByteN // This compares both 'n' or 'N' as true. + ((!format.IsEmpty && (format[0] | 0x20) == formatByteN) // This compares both 'n' or 'N' as true. || Revision == 0); if (utf8Destination.Length < 4) From b5d2175b60866ffae2459ca9e1470510ba31270e Mon Sep 17 00:00:00 2001 From: Kemal Setya Adhi Date: Sun, 30 Nov 2025 14:27:23 +0700 Subject: [PATCH 9/9] Increase GameVersion.ToString() buffer to 48 bytes Technically, no one would use any Major, Minor and Build version number beyond ushort.MaxValue. In any-case, the ToString should be able to print the most maximum (non-sense) characters, which is 47 characters long as follows: -2147483648.-2147483648.-2147483648.-2147483648 --- Management/GameVersion.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Management/GameVersion.cs b/Management/GameVersion.cs index bc0a900..bfa00c6 100644 --- a/Management/GameVersion.cs +++ b/Management/GameVersion.cs @@ -117,7 +117,7 @@ public readonly GameVersion GetIncrementedVersion() /// A string representation of . public readonly string ToString(string? format, IFormatProvider? formatProvider = null) { - scoped Span writeStackalloc = stackalloc char[32]; + scoped Span writeStackalloc = stackalloc char[48]; return !TryFormat(writeStackalloc, out int written, format, formatProvider) ? throw new InvalidOperationException("Cannot write string to stackalloc buffer!") : new string(writeStackalloc[..written]);