CliOptionAttributeName Property
Gets or sets the name of the option that will be used on the command line to specify the option.
When manually setting a name (overriding target property’s name), you should specify the option name including the prefix (e.g.
--option,
-option or
/option)
This will be displayed in usage help of the command line application.
If not set (or is empty/whitespace), the name of the property that this attribute is applied to, will be used to generate option name automatically:
These suffixes will be stripped from the property name: RootCliCommandOption, RootCommandOption, SubCliCommandOption, SubCommandOption, CliCommandOption, CommandOption, CliOption, Option.
Then the name will be converted to kebab-case and will be prefixed with POSIX convention two hyphens (--), for example:
- If property name is Input or InputOption or InputCliOption -> option name will be --input
- If property name is SearchPath or SearchPathOption or SearchPathCliOption -> option name will be --search-path
Default conventions can be changed via parent command's NameCasingConvention and NamePrefixConvention properties.
Namespace: DotMake.CommandLineAssembly: DotMake.CommandLine (in DotMake.CommandLine.dll) Version: 1.8.8
public string Name { get; set; }
Property Value
String