CliNamer Class
Definition
- Namespace
- DotMake.CommandLine
- Assembly
- DotMake.CommandLine.dll
Provides methods for generating CLI names and aliases while tracking already used ones.
public class CliNamer
- Inheritance
-
CliNamer
Constructors
| CliNamer(CliNameAutoGenerate?, CliNameCasingConvention?, CliNamePrefixConvention?, CliNameAutoGenerate?, CliNamePrefixConvention?, CliNamer) |
Initializes a new instance of the CliNamer class. |
Methods
| AddArgumentSymbol(string, string) |
Adds an argument symbol which is used for auto generated or specific names. |
| AddCommandSymbol(string, string, string, string[]) |
Adds a command symbol which is used for auto generated or specific names/aliases. |
| AddDirectiveSymbol(string, string) |
Adds a directive symbol which is used for auto generated or specific names. |
| AddOptionSymbol(string, string, string, string[]) |
Adds an option symbol which is used for auto generated or specific names/aliases. |
| GetArgumentName(string) |
Gets a specific argument name for a symbol, or an auto generated one by using current DotMake.CommandLine.CliNamer.nameCasingConvention. Auto name is generated only when current DotMake.CommandLine.CliNamer.nameAutoGenerate contains Arguments. |
| GetCommandAliases(string) |
Gets specific command aliases for a symbol, or auto generated ones by using current DotMake.CommandLine.CliNamer.nameCasingConvention. Auto aliases is generated only when current DotMake.CommandLine.CliNamer.nameAutoGenerate contains Commands. Auto short form alias is added only when current DotMake.CommandLine.CliNamer.shortFormAutoGenerate contains Commands and it is shorter than command name. |
| GetCommandName(string) |
Gets a specific command name for a symbol, or an auto generated one by using current DotMake.CommandLine.CliNamer.nameCasingConvention. Auto name is generated only when current DotMake.CommandLine.CliNamer.nameAutoGenerate contains Commands. |
| GetDirectiveName(string) |
Gets a specific directive name for a symbol, or an auto generated one by using current DotMake.CommandLine.CliNamer.nameCasingConvention. Auto name is generated only when current DotMake.CommandLine.CliNamer.nameAutoGenerate contains Directives. |
| GetOptionAliases(string) |
Gets specific option aliases for a symbol, or auto generated ones by using current DotMake.CommandLine.CliNamer.nameCasingConvention. Auto aliases is generated only when current DotMake.CommandLine.CliNamer.nameAutoGenerate contains Options. Auto short form alias is added only when current DotMake.CommandLine.CliNamer.shortFormAutoGenerate contains Options and it is shorter than option name. |
| GetOptionName(string) |
Gets a specific option name for a symbol, or an auto generated one by using current DotMake.CommandLine.CliNamer.nameCasingConvention and DotMake.CommandLine.CliNamer.namePrefixConvention. Auto name is generated only when current DotMake.CommandLine.CliNamer.nameAutoGenerate contains Options. |
| VerifyAndGenerateNames() |
Verifies added symbol names and generates auto names according to DotMake.CommandLine.CliNamer.nameAutoGenerate setting. Tracks used specific names and aliases and throws if name already exists. Silently ignores auto generated names and aliases if they conflict. |