Skip to content

Consider a CliAction design that doesn't require custom implementations to override both Invoke and InvokeAsync methods #1934

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

Open
Tracked by #1891
jonsequitur opened this issue Nov 2, 2022 · 1 comment
Labels
Area-API needs discussion Further discussion required
Milestone

Comments

@jonsequitur
Copy link
Contributor

jonsequitur commented Nov 2, 2022

public abstract class CliAction
{
    public abstract int Invoke(ParseResult parseResult);
    public abstract Task<int> InvokeAsync(ParseResult parseResult, CancellationToken cancellationToken = default);
}
@jonsequitur jonsequitur mentioned this issue Nov 2, 2022
56 tasks
@jonsequitur jonsequitur changed the title Consider a design that doesn't require two methods (e.g. a delegate instead of an interface) when any given handler instance only needs one Consider a ICommandHandler design that doesn't require both Invoke and InvokeAsync methods Nov 2, 2022
@jonsequitur jonsequitur added the needs discussion Further discussion required label Nov 2, 2022
@jonsequitur jonsequitur added this to the 2.0 GA milestone Nov 9, 2022
@KalleOlaviNiemitalo
Copy link

ICommandHandler was replaced with CliAction in #2095, but this issue applies to that too.

@jonsequitur jonsequitur changed the title Consider a ICommandHandler design that doesn't require both Invoke and InvokeAsync methods Consider a CliAction design that doesn't require custom implementations to override both Invoke and InvokeAsync methods Mar 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-API needs discussion Further discussion required
Projects
None yet
Development

No branches or pull requests

2 participants