upgrade net10
This pull request focuses on modernizing and simplifying the codebase, primarily through code style improvements, C# language feature adoption, and minor dependency updates. The changes include converting namespaces to file-scoped declarations, using expression-bodied members for concise code, updating project configuration to leverage the latest C# features, and upgrading a test SDK dependency.
Codebase modernization and simplification:
-
Converted namespaces to file-scoped declarations and removed unnecessary braces for improved readability across multiple files, such as
NodaTimeField.cs,CustomQueryTranslators.cs,CustomQueryValueConverters.cs,Extensions.cs, and several files underImports/NodaTime.Serialization.JsonNet. [1] [2] [3] [4] [5] [6] [7] [8] [9] -
Replaced method bodies with expression-bodied members for simple methods and properties to reduce boilerplate and improve clarity, especially in utility and converter classes. [1] [2] [3] [4] [5] [6] [7]
-
Used modern C# language features such as pattern matching (
is not), null-coalescing assignment, and null-conditional operators to simplify logic and improve code safety. [1] [2] [3] [4]
Project configuration updates:
-
Enabled latest C# language version and implicit usings in
Directory.Build.propsto support modern syntax and reduce manual using directives. -
Updated
Microsoft.NET.Test.Sdkpackage to version 18.0.1 for improved test infrastructure.