Class ExternalCommandLineArgumentDefinition
Defines a command line argument.
Inherited Members
Namespace: SdlSdl.DesktopIntegrationApiExtensionsCommandLine
Assembly: Sdl.Desktop.IntegrationApi.Extensions.dll
Syntax
public class ExternalCommandLineArgumentDefinition
Constructors
ExternalCommandLineArgumentDefinition(string, string)
Creates a new command line argument definition with the given argument name and description.
Declaration
public ExternalCommandLineArgumentDefinition(string name, string description)
Parameters
Type | Name | Description |
---|---|---|
string | name | |
string | description |
Properties
Aliases
Gets or sets a list of alias arguments that can be used instead of the main argument name in the Name property.
Declaration
public IList<string> Aliases { get; set; }
Property Value
Type | Description |
---|---|
IListstring |
Description
Gets or sets the description of the argument (shown in the usage text).
Declaration
public string Description { get; set; }
Property Value
Type | Description |
---|---|
string |
MaxValues
Gets or sets the maximum number of values expected for this argument, if it is specified. Set to -1 in order to allow un unlimited number of values. Defaults to -1.
Declaration
public int MaxValues { get; set; }
Property Value
Type | Description |
---|---|
int |
MinValues
Gets or sets the minimum number of values expected for this argument, if it is specified. Defaults to 0.
Declaration
public int MinValues { get; set; }
Property Value
Type | Description |
---|---|
int |
Name
Gets or sets the argument name. The user must use this name, preceded by a slash ('/') in order to specify this argument on the command line, followed by a number of values separated by a space.
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
string |
Required
Gets or sets if this argument is required = true or optional = false.
Declaration
public bool Required { get; set; }
Property Value
Type | Description |
---|---|
bool |
SampleValues
Gets or sets an array of sample argument value strings to be used in the command line help.
Declaration
public string[] SampleValues { get; set; }
Property Value
Type | Description |
---|---|
string |
Remarks
The default value is a string[] containing the main argument name appended with '1'. Also when displaying the command line help if more sample names are needed to display required or optional sample names then an incrementing number is appended to the last sample name in the the array.