|
Joutsen.ArgumentsParsing
v0.2.1
|
An argument that handles input values that are only a name, mostly known as flags. More...
Public Member Functions | |
| FlagArgument (String flag, String alternative, String destination, TValueType parsedValue, TValueType unparsedValue=default(TValueType), String help=null) | |
| Creates a new instance of the argument. More... | |
| override string | Description (string name=null, string alternative=null) |
| override string | Usage (string name=null) |
| FlagArgument (String flag, String alternative, String destination, bool value=true, String help=null) | |
| Creates a new instance of the argument. More... | |
Public Member Functions inherited from Joutsen.ArgumentsParsing.TargetPropertyArgument< TValueType > | |
| ArgumentLiteralParser | GetParser () |
| Fetchs the literal parser for this argument. More... | |
Static Public Member Functions | |
| static FlagArgument< ValueType > | Create< TargetType, ValueType > (String flag, String alternative, Expression< Func< TargetType, ValueType >> destination, ValueType parsedValue, ValueType unparsedValue=default(ValueType), string help=null) |
| Creates a new instance of the typed FlagArgument. More... | |
| static FlagArgument | Create< TargetType > (String flag, String alternative, Expression< Func< TargetType, bool >> destination=null, bool value=true, string help=null) |
| Creates a new instance of the FlagArgument. More... | |
Properties | |
| string | Alternative [get] |
| The alternative name that is usually a longer version of the flag as it appears in the input list. More... | |
Properties inherited from Joutsen.ArgumentsParsing.TargetPropertyArgument< TValueType > | |
| String | Name [get] |
| bool | IsRequired [get] |
Additional Inherited Members | |
Protected Member Functions inherited from Joutsen.ArgumentsParsing.TargetPropertyArgument< TValueType > | |
| TargetPropertyArgument (ArgumentReader< ValueType > reader, string name, bool required, ValueType defaultValue, string destination, string help, bool isFlag) | |
| Creates a new instance of the argument. More... | |
Protected Attributes inherited from Joutsen.ArgumentsParsing.TargetPropertyArgument< TValueType > | |
| string | helpText |
| TargetPropertyParser< ValueType > | parser |
An argument that handles input values that are only a name, mostly known as flags.
The presence and absence of a flag indicate two different values.
| TValueType | the type of the values represented by the flag |
| Joutsen.ArgumentsParsing.FlagArgument< TValueType >.FlagArgument | ( | String | flag, |
| String | alternative, | ||
| String | destination, | ||
| TValueType | parsedValue, | ||
| TValueType | unparsedValue = default(TValueType), |
||
| String | help = null |
||
| ) |
Creates a new instance of the argument.
| flag | the name of the flag as it appears in the input list |
| alternative | an alternative name that is usually a longer version of the flag as it appears in the input list |
| destination | the property name of the target instance which shall recieve the parsed value. If this is null the name will be used instead. |
| parsedValue | the resulting parsed value of the argument if it was present in the input list |
| unparsedValue | the resulting default value of the argument if it was NOT present in the input list |
| help | a help text describing the parameter. It will be used to generade the description of the argument. |
| Joutsen.ArgumentsParsing.FlagArgument< TValueType >.FlagArgument | ( | String | flag, |
| String | alternative, | ||
| String | destination, | ||
| bool | value = true, |
||
| String | help = null |
||
| ) |
Creates a new instance of the argument.
| flag | the name of the flag as it appears in the input list |
| alternative | an alternative name that is usually a longer version of the flag as it appears in the input list |
| destination | the property name of the target instance which shall recieve the parsed value. If this is null the name will be used instead. |
| value | the resulting boolean value of the argument if it was present in the input list. The inverted value becomes the defaultValue. |
| help | a help text describing the parameter. It will be used to generade the description of the argument. |
|
static |
Creates a new instance of the FlagArgument.
| TargetType | the type of the target object that will receive the parsed values. |
| flag | the name of the flag as it appears in the input list |
| alternative | an alternative name that is usually a longer version of the flag as it appears in the input list |
| destination | an expression describing the property of the target instance which shall recieve the parsed value. If this is null the target property will be found using the name of the argument. |
| value | the resulting boolean value of the argument if it was present in the input list. The inverted value becomes the defaultValue. |
| help | a help text describing the parameter. It will be used to generade the description of the argument. |
|
static |
Creates a new instance of the typed FlagArgument.
| TargetType | the type of the target object that will receive the parsed values. |
| ValueType | the type of the ValueArgument and the property on the target object |
| flag | the name of the flag as it appears in the input list |
| alternative | an alternative name that is usually a longer version of the flag as it appears in the input list |
| destination | an expression describing the property of the target instance which shall recieve the parsed value. If this is null the target property will be found using the name of the argument. |
| parsedValue | the resulting parsed value of the argument if it was present in the input list |
| unparsedValue | the resulting default value of the argument if it was NOT present in the input list |
| help | a help text describing the parameter. It will be used to generade the description of the argument. |
|
virtual |
Reimplemented from Joutsen.ArgumentsParsing.TargetPropertyArgument< TValueType >.
|
virtual |
Reimplemented from Joutsen.ArgumentsParsing.TargetPropertyArgument< TValueType >.
|
get |
The alternative name that is usually a longer version of the flag as it appears in the input list.
1.8.13