Skip to content

feat: upgrade to .NET 10, modernise and optimise code#3

Merged
xen2 merged 13 commits intostride3d:masterfrom
Kryptos-FR:features/net10-upgrade
Apr 7, 2026
Merged

feat: upgrade to .NET 10, modernise and optimise code#3
xen2 merged 13 commits intostride3d:masterfrom
Kryptos-FR:features/net10-upgrade

Conversation

@Kryptos-FR
Copy link
Copy Markdown
Member

@Kryptos-FR Kryptos-FR commented Mar 31, 2026

Fixes stride3d/stride#3113

Also optimise Regex in GNU.Gettext/GNU.Gettext.Xgettext/ExtractorCsharp.cs

@Kryptos-FR Kryptos-FR changed the base branch from xenko to master March 31, 2026 19:49
@Kryptos-FR Kryptos-FR changed the title Upgrade to .NET 10, modernise and optimise code feat: upgrade to .NET 10, modernise and optimise code Mar 31, 2026
- string.Format(...) → $"" interpolated strings throughout
- new List<T>() / new Dictionary<K,V>() → [] collection expressions
- using (x) { } → using x; declarations (FileUtils, AssemblyGen, ResourcesGen, ExtractorCsharp)
- null == / != null → is null / is not null patterns
- ternary null check → ?? null-coalescing (FormatValidator)
- Remove #region/#endregion from AssemblyGen
- Expression-bodied ToConstStr in AssemblyGen
All 17 fixed patterns baked into [GeneratedRegex] partial methods compiled
at build time. ProcessPattern now takes Regex instead of string. Only
user-supplied custom patterns remain dynamic. Composite const strings are
preserved so shared sub-patterns (CsharpStringPattern, TwoStringsArguments-
Pattern, etc.) remain visible and reused in the const declarations.
@Kryptos-FR Kryptos-FR force-pushed the features/net10-upgrade branch from e79f95b to 8a9a104 Compare March 31, 2026 19:55
@xen2 xen2 merged commit 7468617 into stride3d:master Apr 7, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update Gettext.Net to target .NET 10.0

2 participants