virtualSoC  0.6.2
baskett
DotArgs.AliasArgument Class Reference

Argument that acts as an alias for another argument. More...

+ Inheritance diagram for DotArgs.AliasArgument:

Public Member Functions

 AliasArgument (Argument entry)
 Initializes a new instance of the AliasArgument class. More...
 
override object GetValue ()
 Gets the value of this argument. More...
 
override void SetValue (object value)
 Sets the value for this argument. More...
 
 AliasArgument (Argument entry)
 Initializes a new instance of the AliasArgument class. More...
 
override object GetValue ()
 Gets the value of this argument. More...
 
override void SetValue (object value)
 Sets the value for this argument. More...
 
 AliasArgument (Argument entry)
 Initializes a new instance of the AliasArgument class. More...
 
override object GetValue ()
 Gets the value of this argument. More...
 
override void SetValue (object value)
 Sets the value for this argument. More...
 
virtual void Reset ()
 Resets this argument. More...
 
virtual void Reset ()
 Resets this argument. More...
 
virtual void Reset ()
 Resets this argument. More...
 

Properties

new object DefaultValue [get, set]
 The default value that will be used if no value was passed on the command line. More...
 
new bool IsRequired [get]
 Flag indicating whether this argument is required, i.e. must be provided via the command line. More...
 
new bool SupportsMultipleValues [get]
 Flag indicating whether multplie calls to SetValue will add a value or overwrite the existing one. More...
 
string HelpMessage [get, set]
 The message that will be displayed in the help page for your program. More...
 
string HelpPlaceholder [get, set]
 Value that will be shown (in upper case) in the usage page for this argument. Setting this to null will display the default value (i.e. OPTION, COLLECTION, etc.). More...
 
bool NeedsValue [get, protected set]
 Indicates whether this argument requires an explicit option. More...
 
Action< object > Processor [get, set]
 A method that can be executed when the command line arguments are processed. More...
 
Func< object, bool > Validator [get, set]
 A method that can be used to validate a value for this argument. More...
 

Detailed Description

Argument that acts as an alias for another argument.

Constructor & Destructor Documentation

◆ AliasArgument() [1/3]

DotArgs.AliasArgument.AliasArgument ( Argument  entry)

Initializes a new instance of the AliasArgument class.

Parameters
entryThe argument this alias should mirror.
31  : base( entry.DefaultValue, entry.IsRequired )
32  {
33  Reference = entry;
34  }

◆ AliasArgument() [2/3]

DotArgs.AliasArgument.AliasArgument ( Argument  entry)

Initializes a new instance of the AliasArgument class.

Parameters
entryThe argument this alias should mirror.
31  : base( entry.DefaultValue, entry.IsRequired )
32  {
33  Reference = entry;
34  }

◆ AliasArgument() [3/3]

DotArgs.AliasArgument.AliasArgument ( Argument  entry)

Initializes a new instance of the AliasArgument class.

Parameters
entryThe argument this alias should mirror.
31  : base( entry.DefaultValue, entry.IsRequired )
32  {
33  Reference = entry;
34  }

Member Function Documentation

◆ GetValue() [1/3]

override object DotArgs.AliasArgument.GetValue ( )
virtual

Gets the value of this argument.

Returns
The argument's value.

Reimplemented from DotArgs.Argument.

39  {
40  return Reference.GetValue();
41  }
virtual object GetValue()
Gets the value of this argument.
Definition: CommandLineArgs.cs:105

◆ GetValue() [2/3]

override object DotArgs.AliasArgument.GetValue ( )
virtual

Gets the value of this argument.

Returns
The argument's value.

Reimplemented from DotArgs.Argument.

39  {
40  return Reference.GetValue();
41  }
virtual object GetValue()
Gets the value of this argument.
Definition: CommandLineArgs.cs:105

◆ GetValue() [3/3]

override object DotArgs.AliasArgument.GetValue ( )
virtual

Gets the value of this argument.

Returns
The argument's value.

Reimplemented from DotArgs.Argument.

39  {
40  return Reference.GetValue();
41  }
virtual object GetValue()
Gets the value of this argument.
Definition: CommandLineArgs.cs:105

◆ Reset() [1/3]

virtual void DotArgs.Argument.Reset ( )
virtualinherited

Resets this argument.

Reimplemented in DotArgs.CollectionArgument, DotArgs.CollectionArgument, and DotArgs.CollectionArgument.

112  {
113  Value = DefaultValue;
114  }
object DefaultValue
The default value that will be used if no value was passed on the command line.
Definition: CommandLineArgs.cs:134

◆ Reset() [2/3]

virtual void DotArgs.Argument.Reset ( )
virtualinherited

Resets this argument.

Reimplemented in DotArgs.CollectionArgument, DotArgs.CollectionArgument, and DotArgs.CollectionArgument.

112  {
113  Value = DefaultValue;
114  }
object DefaultValue
The default value that will be used if no value was passed on the command line.
Definition: CommandLineArgs.cs:134

◆ Reset() [3/3]

virtual void DotArgs.Argument.Reset ( )
virtualinherited

Resets this argument.

Reimplemented in DotArgs.CollectionArgument, DotArgs.CollectionArgument, and DotArgs.CollectionArgument.

112  {
113  Value = DefaultValue;
114  }
object DefaultValue
The default value that will be used if no value was passed on the command line.
Definition: CommandLineArgs.cs:134

◆ SetValue() [1/3]

override void DotArgs.AliasArgument.SetValue ( object  value)
virtual

Sets the value for this argument.

Parameters
valueThe value to set.

Reimplemented from DotArgs.Argument.

46  {
47  Reference.SetValue( value );
48  }
virtual void SetValue(object value)
Sets the value for this argument.
Definition: CommandLineArgs.cs:118

◆ SetValue() [2/3]

override void DotArgs.AliasArgument.SetValue ( object  value)
virtual

Sets the value for this argument.

Parameters
valueThe value to set.

Reimplemented from DotArgs.Argument.

46  {
47  Reference.SetValue( value );
48  }
virtual void SetValue(object value)
Sets the value for this argument.
Definition: CommandLineArgs.cs:118

◆ SetValue() [3/3]

override void DotArgs.AliasArgument.SetValue ( object  value)
virtual

Sets the value for this argument.

Parameters
valueThe value to set.

Reimplemented from DotArgs.Argument.

46  {
47  Reference.SetValue( value );
48  }
virtual void SetValue(object value)
Sets the value for this argument.
Definition: CommandLineArgs.cs:118

Property Documentation

◆ DefaultValue

new object DotArgs.AliasArgument.DefaultValue
getset

The default value that will be used if no value was passed on the command line.

Using this when IsRequired is set will have no effect.

◆ HelpMessage

string DotArgs.Argument.HelpMessage
getsetinherited

The message that will be displayed in the help page for your program.

◆ HelpPlaceholder

string DotArgs.Argument.HelpPlaceholder
getsetinherited

Value that will be shown (in upper case) in the usage page for this argument. Setting this to null will display the default value (i.e. OPTION, COLLECTION, etc.).

◆ IsRequired

new bool DotArgs.AliasArgument.IsRequired
get

Flag indicating whether this argument is required, i.e. must be provided via the command line.

◆ NeedsValue

bool DotArgs.Argument.NeedsValue
getprotected setinherited

Indicates whether this argument requires an explicit option.

◆ Processor

Action< object > DotArgs.Argument.Processor
getsetinherited

A method that can be executed when the command line arguments are processed.

◆ SupportsMultipleValues

new bool DotArgs.AliasArgument.SupportsMultipleValues
get

Flag indicating whether multplie calls to SetValue will add a value or overwrite the existing one.

◆ Validator

Func< object, bool > DotArgs.Argument.Validator
getsetinherited

A method that can be used to validate a value for this argument.


The documentation for this class was generated from the following file: