-
Notifications
You must be signed in to change notification settings - Fork 483
Add async API for a few extension methods #474
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
Conversation
Thanks @IEvangelist for your work. |
I like what I see in #390, merge that one... mine is less complete. And as far of the discussion you call attention to, well I suppose you could do that. It is correctly accepting a |
What about the use case when only one verb is async and the others are not.
We should use ALL func(s) as async or ALL not async. |
That is why my suggestion in this pull request wasn't to use static async Task<int> Main(string[] args)
{
var result = Parser.Default.ParseArguments<Options>(args);
await result .WithParsedAsync(async options => { ... await } );
result.WithNotParsed(errors => { ... });
} They could easily live together if not explicitly bound with the |
I think that I can't pick and choose / mix and match. (I mean PR #390)
You can try this example using the dev package of asyn of PR #390 here . |
That is good for the method All the parameters of the extension methods of PR #390 are using:
kindly, can you give me other example for MapResultAsync with the the three verbs: one async and the others are not async. Maybe I missed something. |
I didn't write the |
Yes, you are correct. I discussed PR #390 because you have an opinion for merging it. |
That makes more sense. I guess I was all for the merging of #390 because it added the async APIs that I selfishly cared about, i.e.; the |
5e09c7d
to
182e72f
Compare
This will enable task-based Main entry point in C# 7.1+ projects -- which would be awesome.