Open
Description
This is a simple example:
var rootCommand = new RootCommand
{
new Command("do-something")
{
new Command("abcdefg") // How to add aliases here?
new Command("qwerty")
}
};
In this case, you have to give up using the object initializer and manually add the commands.
This supposed example demonstrates an easy way to build commands.
var rootCommand = new RootCommand
{
new Command("do-something")
{
new Command("abcdefg") { Aliases = { "c", "w" } } // In reality, this will raise a compiler error, because Aliases is a IReadOnlyList<string>
new Command("qwerty")
}
};