CliCommandAttribute.Name Property
Definition
- Namespace
- DotMake.CommandLine
- Assembly
- DotMake.CommandLine.dll
Gets or sets the name of the command that will be used on the command line to specify the command. This will be displayed in usage help of the command line application.
If not set (or is empty/whitespace), the name of the class that this attribute is applied to, will be used to generate command name automatically:
These suffixes will be stripped from the class name: RootCliCommand, RootCommand, SubCliCommand, SubCommand, CliCommand, Command, Cli.
Then the name will be converted to kebab-case, for example:
- If class name is
BuildorBuildCommandorBuildRootCliCommand-> command name will bebuild - If class name is
BuildTextorBuildTextCommandorBuildTextSubCliCommand-> command name will bebuild-text
Default convention can be changed via command's NameCasingConvention property.
public string Name { get; set; }