-
Notifications
You must be signed in to change notification settings - Fork 404
Closed
Description
I have the following parsing code:
public void Run(string[] cliArgs)
{
var rootCommand = new RootCommand
{
new Argument<string>("table", "The name of a DB table to create DAL artifacts for"),
new Option<string>(new[] {"-m", "--model"}, "The name of an existing DAL model to create the table artifacts for"),
new Option(new[] {"-o", "--overwrite"}, "Update the list of models and tables from the DAL")
};
rootCommand.Handler = CommandHandler.Create<string, string, bool, IConsole>(CreateTableArtifacts);
rootCommand.Invoke(cliArgs);
}
Where cliArgs
is an array with one non-empty string value. Then I have my command handler with signature:
private void CreateTableArtifacts(string tableName, string? modelName, bool overwrite, IConsole console)
But inside the handler, the tableName
param has the empty string value. Why is this?
Metadata
Metadata
Assignees
Labels
No labels