nfc: Clean up multiple enumerations of IEnumerable<> in WriteSolutionFile().#1
nfc: Clean up multiple enumerations of IEnumerable<> in WriteSolutionFile().#1petercrabtree wants to merge 7 commits into
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
There was a problem hiding this comment.
Pull Request Overview
This PR updates the codebase to target .NET 10.0 and adds support for new C# 13 features (inline arrays, params collections, overflow checks), along with numerous related adjustments in project files, build scripts, resource files, and decompiler internals.
- Upgrade target frameworks, SDK versions, and NuGet feeds to .NET 10.0
- Introduce inline array support and params‐collections in the decompiler
- Add “CheckForOverflowUnderflow” option and integrate it throughout project writers and transforms
Reviewed Changes
Copilot reviewed 119 out of 121 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| publishlocaldev.ps1, publish.ps1, global.json, *.csproj | Bump all build and publish scripts and projects to .NET 10.0 |
| ILSpy/Options/DecompilerSettings.cs | Add ParamsCollections and InlineArrays flags; refactor Clone |
| ICSharpCode.Decompiler/Solution/SolutionCreator.cs | Change WriteSolutionFile to accept List |
| ILSpy/Search/SearchPane.xaml.cs | Rename Clone usage to direct settings assignment |
| ICSharpCode.Decompiler/TypeSystem/MetadataFile.cs | Add PropertyAndEventBackingFieldLookup injection |
| ICSharpCode.Decompiler/IL/Transforms/InlineArrayTransform.cs | Add new inline array IL transform |
Files not reviewed (1)
- ILSpy/Properties/Resources.Designer.cs: Language not supported
Comments suppressed due to low confidence (3)
global.json:3
- Update project documentation (README, CONTRIBUTING, CI config) to note the new .NET 10.0 SDK requirement so developers are aware of the upgrade.
"version": "10.0.0",
ILSpy/Search/SearchPane.xaml.cs:481
- Assigning the shared decompilerSettings instance instead of a clone means later requests may see modified settings; use Clone() or a deep copy to isolate each request.
request.DecompilerSettings = decompilerSettings;
ILSpy/Options/DecompilerSettings.cs:58
- [nitpick] The new override delegates to base.Clone(), but ensure that all nested mutable fields (like CSharpFormattingOptions) are also deeply cloned, otherwise instances may inadvertently share state.
public override DecompilerSettings Clone()
| }); | ||
| }; | ||
| } | ||
| ; |
There was a problem hiding this comment.
[nitpick] Remove the stray semicolon on its own line after the closing brace; it is an empty statement and may confuse readers.
| ; |
| public static class SolutionCreator | ||
| { | ||
| private static readonly XNamespace ProjectFileNamespace = XNamespace.Get("http://schemas.microsoft.com/developer/msbuild/2003"); | ||
| static readonly XNamespace ProjectFileNamespace = XNamespace.Get("http://schemas.microsoft.com/developer/msbuild/2003"); |
There was a problem hiding this comment.
[nitpick] Add an explicit access modifier (private or internal) to the static field to clarify intended visibility and maintain consistency with other members.
| static readonly XNamespace ProjectFileNamespace = XNamespace.Get("http://schemas.microsoft.com/developer/msbuild/2003"); | |
| private static readonly XNamespace ProjectFileNamespace = XNamespace.Get("http://schemas.microsoft.com/developer/msbuild/2003"); |
…File(). (This is potentially expensive and the method is public, just a minor code smell.)
I accept any sideways glance for the allocation-averse code
393b848 to
f32c93f
Compare
f32c93f to
fdb0703
Compare

Link to issue(s) this covers
Problem
Link to, or brief information about the issue
Solution