Skip to content

Accessing global options #1695

Description

@beachwalker

I don't see how to handle global options with the new 2.0 API.


         var cmd = //... some Command, the RootCommand is somewhere else created, not accessible here
         var arg = new Argument<string>("x", "Mysterious x");

        cmd.SetHandler(async (string x) =>
            {
                await DoSomething(x);
            },
            someArgument);`

Question: How to access/fill global options in this case?

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