-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
How to use this library with async actions #10
Comments
Hi @ViRuSTriNiTy, Thanks for the compliment 😃
Could you please provide some code to reproduce the issue?
The menu does not support async code. My advice is to run the code synchronously by using |
+1 to get async await implemented |
@joymon could you provide me a use case where async await support is needed? |
Environent has a compilation setting "Treat warnings as errors" and when we use the below its showing a compilation error. "The async method lacks 'await' operators...." |
It doesn't look like a real world use case. In the provided example, the warning can be fixed simply by removing void TestMenu(string[] args)
{
var cm = new ConsoleMenu(args, level: 2);
cm.Show();
} I asked about use case because console applications are, in fact, synchronous and async Main is just a syntax sugar of |
Thanks for the response. The sample was from an app having half a million lines of code. We will see if we can remove async. |
I just released version 2.6.0 with the async API. |
@lechu445 Works perfectly. Thank you! |
Hi there,
great package, it gets you started real quick. I try to use it with some simple async code and Serilog logging. But as soon as I have executed the first menu action the Serilog logging won't work anymore.
It seem like the use of GetAwaiter().GetResult() is causing this.
Do you have any hints / recommendation on how to use async code in the menu actions?
So lonG
Daniel
The text was updated successfully, but these errors were encountered: