Separate command parsing from action binding in Tool and Workload subcommands #52139
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Refactors Tool and Workload command subcommands to separate parsing structure from action binding, establishing clear separation of concerns.
Pattern
Each subcommand now follows:
XyzCommandDefinition.cs- Command structure (options, arguments) withCreate()method. No action binding.XyzCommandParser.cs- CallsDefinition.Create()and binds action viaSetAction(). Exposes backward-compatible static properties.XyzCommand.cs- Unchanged execution logic.Example
Before:
After:
Scope
Tool commands (8): install, update, uninstall, list, search, restore, run, execute
Workload commands (12): install, update, uninstall, list, search, search versions, restore, repair, clean, elevate, history, config
Notes
.git-blame-ignore-revsWarning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
test.example.com/home/REDACTED/work/sdk/sdk/artifacts/bin/redist/Debug/dotnet/dotnet /home/REDACTED/work/sdk/sdk/artifacts/bin/redist/Debug/dotnet/dotnet tool install -g fake-tool aller/sdk/11.0.100-dev/Microsoft.Build.Tasks.Core.dll sources.dll p/bin/chmod ources.dll resources.dll k/sdk/sdk/.dotne--depsfile chmod 644 ebug/dotnet-inst/home/REDACTED/work/sdk/sdk/.dotnet/sdk/10.0.100-rc.1.25451.107/DotnetTools/dotnet/home/REDACTED/work/sdk/sdk/artifacts/bin/redist/Debug/dotnet/dotnet ectedData.dll hmod esources.dll rces.dll k/sdk/sdk/.dotne--noprofile chmod(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.