CliCommandAttributeName Property

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 Build or BuildCommand or BuildRootCliCommand -> command name will be build
  • If class name is BuildText or BuildTextCommand or BuildTextSubCliCommand -> command name will be build-text

Default convention can be changed via command's NameCasingConvention property.

Definition

Namespace: DotMake.CommandLine
Assembly: DotMake.CommandLine (in DotMake.CommandLine.dll) Version: 1.8.7
C#
public string Name { get; set; }

Property Value

String

See Also