Skip to content

MapResult Usage with async methods #273

@SuperJMN

Description

@SuperJMN

I'm using it CommandLineParser from and async Task Main method.

I would like to use verbs, so I would use the recommended syntax:

CommandLine.Parser.Default.ParseArguments<Options1, Options2, Options3>(args)
	.MapResult(
	  (Options1opts) => Method1(opts),
	  (Options2opts) => Method2(opts),
	  (Options3opts) => Method2(opts),
	  errs => 1);

But in my case, the methods are async. Howo do I use the MapResult in this scenario?
The same problem occurs with the WithParsed methods.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions