CliDirectiveAttributeName Property

Gets or sets the name of the directive that will be used on the command line to specify the directive.

If not set (or is empty/whitespace), the name of the property that this attribute is applied to, will be used to generate directive name automatically: These suffixes will be stripped from the property name: RootCliCommandDirective, RootCommandDirective, SubCliCommandDirective, SubCommandDirective, CliCommandDirective, CommandDirective, CliDirective, Directive. Then the name will be converted to kebab-case, for example:

  • If property name is Debug or DebugDirective or DebugCliDirective -> directive name will be debug
  • If property name is NoRestore or NoRestoreDirective or NoRestoreCliDirective -> directive name will be no-restore

Default conventions can be changed via parent command's NameCasingConvention and NamePrefixConvention properties.

Definition

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

Property Value

String

See Also