CliDirectiveAttribute.Name Property
Definition
- Namespace
- DotMake.CommandLine
- Assembly
- DotMake.CommandLine.dll
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
DebugorDebugDirectiveorDebugCliDirective-> directive name will bedebug - If property name is
NoRestoreorNoRestoreDirectiveorNoRestoreCliDirective-> directive name will beno-restore
Default conventions can be changed via parent command's NameCasingConvention and NamePrefixConvention properties.
public string Name { get; set; }