镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Refactor Tool and Workload command subcommands - separate parsing and action logic - #52162

Merged
tmat merged 4 commits into
dotnet:release/10.0.2xxfrom
tmat:WorkloadToolCmds
Jan 5, 2026
Merged

tmat merged 4 commits into
dotnet:release/10.0.2xxfrom
tmat:WorkloadToolCmds

Conversation

@tmat

@tmat tmat commented Dec 15, 2025 •

Copy link
Copy Markdown
Member

First commit implements the separation and was authored by copilot.

The second and third commits switch from static option fields to instance fields for all workload and tool commands and subcommands, following the pattern established by #52137.

The last commit updates test baselines to reflect new ordering of some options.

… action logic

Co-authored-by: tmat <41759+tmat@users.noreply.github.com>
@tmat

tmat commented Jan 5, 2026

Copy link
Copy Markdown
Member Author

@MiYanni ptal


public readonly Option<int> TakeOption = new("--take")
{
DefaultValueFactory = (_) => 5

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this magic number saying it'll return 5 items by default?

@tmat tmat Jan 5, 2026 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just moved the option definition, did not change the impl. Yeah, it seems to set the default value to 5.

@tmat

tmat commented Jan 5, 2026

Copy link
Copy Markdown
Member Author

/ba-g winrt

@tmat
tmat merged commit 54ce3d7 into dotnet:release/10.0.2xx Jan 5, 2026
26 of 30 checks passed
@tmat
tmat deleted the WorkloadToolCmds branch January 5, 2026 23:56
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.

3 participants