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.5.0
C#
public class CliNamer
Inheritance
Object    CliNamer

Constructors

CliNamer Initializes a new instance of the CliNamer class.

Methods

AddAlias(Command, String) Adds an alias to a command. Tracks used aliases and only adds if not already used.
AddAlias(Option, String) Adds an alias to an option. Tracks used aliases and only adds if not already used.
AddShortFormAlias(Command, String, Boolean) Adds a short form alias for a command name for a property by using current nameCasingConvention.

Short form alias is added only when current shortFormAutoGenerate contains Commands and it is shorter than command name.

AddShortFormAlias(Option, String, Boolean) Adds a short form alias for an option name for a property by using current nameCasingConvention and shortFormPrefixConvention.

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

GetArgumentName Gets the argument name for a property by using current nameCasingConvention.
GetCommandName Gets the command name for a property by using current nameCasingConvention.
GetDirectiveName Gets the directive name for a property by using current nameCasingConvention.
GetOptionName Gets the option name for a property by using current nameCasingConvention and namePrefixConvention.

See Also