AliasAttribute Class |
Namespace: Ookii.CommandLine
The AliasAttribute type exposes the following members.
Name | Description | |
---|---|---|
![]() | AliasAttribute |
Initializes a new instance of the AliasAttribute class.
|
Name | Description | |
---|---|---|
![]() | Alias |
Gets the alternative name for the command line argument.
|
![]() | TypeId | (Inherited from Attribute.) |
Name | Description | |
---|---|---|
![]() | Equals | (Inherited from Attribute.) |
![]() | GetHashCode | (Inherited from Attribute.) |
![]() | GetType | (Inherited from Object.) |
![]() | IsDefaultAttribute | (Inherited from Attribute.) |
![]() | Match | (Inherited from Attribute.) |
![]() | ToString | (Inherited from Object.) |
![]() |
---|
To specify multiple aliases, apply this attribute multiple times. |
The aliases for a command line argument can be used instead of their regular name to specify the parameter on the command line. For example, this can be used to have a shorter name for an argument (e.g. "-v" as an alternative to "-Verbose").
All regular command line argument names and aliases used by an instance of the CommandLineParser class must be unique.
By default, the command line usage help generated by WriteUsage(TextWriter, Int32, WriteUsageOptions) does not list the aliases. Either manually add them to the description, or set the IncludeAliasInDescription property to .