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
| AddAlias(Command, string, string) |
Adds an alias to a command. Tracks used names and aliases and throws if alias already exists. |
| AddAlias(Option, string, string) |
Adds an alias to an option. Tracks used aliases and only adds if not already used. Tracks used names and aliases and throws if alias already exists. |
| AddShortFormAlias(Command, string, string) |
Adds an auto or a specific short form alias for a command name for a property by using current DotMake.CommandLine.CliNamer.nameCasingConvention. Auto short form alias is added only when current DotMake.CommandLine.CliNamer.shortFormAutoGenerate contains Commands and it is shorter than command name. |
| AddShortFormAlias(Option, string, string) |
Adds an auto or a specific short form alias for an option name for a property by using current DotMake.CommandLine.CliNamer.nameCasingConvention and DotMake.CommandLine.CliNamer.shortFormPrefixConvention. Auto short form alias is added only when current DotMake.CommandLine.CliNamer.shortFormAutoGenerate contains Options and it is shorter than option name. |
| GetArgumentName(string, string) |
Gets an auto or a specific argument name for a symbol by using current DotMake.CommandLine.CliNamer.nameCasingConvention. Does not throw if name already exists. Auto name is generated only when current DotMake.CommandLine.CliNamer.nameAutoGenerate contains Arguments. |
| GetCommandName(string, string) |
Gets an auto or a specific command name for a symbol by using current DotMake.CommandLine.CliNamer.nameCasingConvention. Tracks used names and aliases and throws if name already exists. Auto name is generated only when current DotMake.CommandLine.CliNamer.nameAutoGenerate contains Commands. |
| GetDirectiveName(string, string) |
Gets an auto or a specific directive name for a symbol by using current DotMake.CommandLine.CliNamer.nameCasingConvention. Tracks used names and aliases and throws if name already exists. Auto name is generated only when current DotMake.CommandLine.CliNamer.nameAutoGenerate contains Directives. |
| GetOptionName(string, string) |
Gets an auto or a specific option name for a symbol by using current DotMake.CommandLine.CliNamer.nameCasingConvention and DotMake.CommandLine.CliNamer.namePrefixConvention. Tracks used names and aliases and throws if name already exists. Auto name is generated only when current DotMake.CommandLine.CliNamer.nameAutoGenerate contains Options. |