Jon Sequeira
Jon Sequeira
Here are a couple of examples that might be relevant. Short answer is I typically just await or block inside the handler. A web server: https://github.com/dotnet/interactive/blob/cd4eac878a932b0e2454f8d5ebf0e68426ce7286/src/dotnet-interactive/CommandLine/CommandLineParser.cs#L88-L99 A long-running stdio server:...
Much more thorough and up-to-date documentation is now available at Microsoft Docs: https://docs.microsoft.com/en-us/dotnet/standard/commandline/
> I could file this as a separate bug if needed. @c-s-n If you could open an issue it would be appreciated. Could you please include a more detailed example...
@KalleOlaviNiemitalo I just created one: https://github.com/dotnet/command-line-api/releases/tag/v2.0.0-beta3.22114.1. We released a few bug fix package updates on beta 3 after the announcement. This points to the code for the most recent one.
@iBicha No updates yet. The scenario is an important one and we'll definitely address it in some form but until the APIs that System.CommandLine.Hosting depends on are stable, it's too...
This should be supported and looks like a bug.
Typically if someone wants to pass an argument with spaces they wrap the argument in quotes: ```console > myapp --name "this will all be parsed as a single token" ```...
Thanks, I understand what's happening now. Because you're telling the model binder to use an instance of your derived `Command` type, it's setting the `Command.Name` property based on the `--name`...
That works too. Just be aware that with this approach the binder will still try mutate your `CmdCommand` instance (if you pass `this` to `CommandHandler.Create` or create another instance of...
Thanks for opening the issue, @Tunduk! I just verified that with the fix for #1759, your sample test also passes, so I'm closing this as a duplicate.