Skip to content

what am I doing wrong (null option in receiver lambda)? #526

@phi1ipp

Description

@phi1ipp

Hey guys,

Can anyone please tell me what I'm doing wrong with the following fragment

var aCommand = new Command("findCreator", handler: CommandHandler.Create<string>(async (string file) =>
{
    Console.WriteLine(file);
}));
aCommand.AddOption(new Option("--input", "input file name", new Argument<string>()));
root.AddCommand(aCommand);

root.InvokeAsync(args).Wait();

I run the app with app findCreator --input filename and getting file as null in my lambda.

Can anybody provide a hint please?

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