Skip to content

Replace CompletionDelegate with Action<CompletionContext> #1927

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

Closed
Tracked by #1891
jonsequitur opened this issue Nov 2, 2022 · 2 comments · Fixed by #1946
Closed
Tracked by #1891

Replace CompletionDelegate with Action<CompletionContext> #1927

jonsequitur opened this issue Nov 2, 2022 · 2 comments · Fixed by #1946
Assignees
Labels
Milestone

Comments

@jonsequitur
Copy link
Contributor

jonsequitur commented Nov 2, 2022

namespace System.CommandLine.Completions
{
    // This is syntactically the same as Action<CompletionContext>, so adding a new delegate type is discouraged.
    // Unless you think you need the type to exists as a place to put documentation.
    public delegate IEnumerable<CompletionItem> CompletionDelegate(CompletionContext context);
@jonsequitur jonsequitur mentioned this issue Nov 2, 2022
56 tasks
@KalleOlaviNiemitalo
Copy link

CompletionDelegate does not return void in the public source. Is it different in the API proposal that was reviewed?

public delegate IEnumerable<CompletionItem> CompletionDelegate(CompletionContext context);

@jonsequitur
Copy link
Contributor Author

jonsequitur commented Nov 2, 2022

This might be a bug in the API summarizer. I'll take a look.

This was a handmade error.

@adamsitnik adamsitnik self-assigned this Nov 3, 2022
adamsitnik added a commit to adamsitnik/command-line-api that referenced this issue Nov 3, 2022
adamsitnik added a commit to adamsitnik/command-line-api that referenced this issue Nov 3, 2022
@jonsequitur jonsequitur added this to the 2.0 GA milestone Nov 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants