CliNamer Class

Provides methods for generating CLI names and aliases while tracking already used ones.

Definition

Namespace: DotMake.CommandLine
Assembly: DotMake.CommandLine (in DotMake.CommandLine.dll) Version: 2.6.7
C#
public class CliNamer
Inheritance
Object    CliNamer

Constructors

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 nameCasingConvention.

Auto short form alias is added only when current 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 nameCasingConvention and shortFormPrefixConvention.

Auto short form alias is added only when current shortFormAutoGenerate contains Options and it is shorter than option name.

GetArgumentName Gets an auto or a specific argument name for a symbol by using current nameCasingConvention. Does not throw if name already exists.

Auto name is generated only when current nameAutoGenerate contains Arguments.

GetCommandName Gets an auto or a specific command name for a symbol by using current nameCasingConvention. Tracks used names and aliases and throws if name already exists.

Auto name is generated only when current nameAutoGenerate contains Commands.

GetDirectiveName Gets an auto or a specific directive name for a symbol by using current nameCasingConvention. Tracks used names and aliases and throws if name already exists.

Auto name is generated only when current nameAutoGenerate contains Directives.

GetOptionName Gets an auto or a specific option name for a symbol by using current nameCasingConvention and namePrefixConvention. Tracks used names and aliases and throws if name already exists.

Auto name is generated only when current nameAutoGenerate contains Options.

See Also