Skip to content

Remove InvocationContext #2108

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Mar 28, 2023
Merged

Conversation

adamsitnik
Copy link
Member

@adamsitnik adamsitnik commented Mar 20, 2023

No description provided.

it allows us for creating the host and everything else after parsing has finished
UseCommandHandler must specify the handler for instance of a Command, not per type as there can be multiple commands of the same type
# Conflicts:
#	src/System.CommandLine.ApiCompatibility.Tests/ApiCompatibilityApprovalTests.System_CommandLine_api_is_not_changed.approved.txt
#	src/System.CommandLine.Tests/Invocation/InvocationPipelineTests.cs
#	src/System.CommandLine/Builder/CommandLineBuilder.cs
#	src/System.CommandLine/Builder/CommandLineBuilderExtensions.cs
#	src/System.CommandLine/CommandLineConfiguration.cs
@adamsitnik adamsitnik marked this pull request as ready for review March 28, 2023 17:36
@adamsitnik adamsitnik requested a review from jonsequitur March 28, 2023 17:36
@adamsitnik
Copy link
Member Author

@jonsequitur the PR is ready. If you approve it and want to merge it, please squash it and remove the commit message (it consists of many commits that were already merged)

@@ -382,13 +381,13 @@ internal sealed class OptionAction : CliAction
{
internal bool WasCalled = false;

public override int Invoke(InvocationContext context)
public override int Invoke(ParseResult context)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
public override int Invoke(ParseResult context)
public override int Invoke(ParseResult parseResult)

@jonsequitur jonsequitur merged commit 72ace16 into dotnet:main Mar 28, 2023
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.

2 participants