|
Joutsen.ArgumentsParsing
v0.2.1
|
A simple argument that parses a value from the input list. More...
Public Member Functions | |
| ValueArgument (string name, bool required=true, ValueType defaultValue=default(ValueType), string destination=null, string help=null) | |
| Creates a new instance of the argument. More... | |
| override string | Usage (string name=null) |
| Fetches the usage description of this argument. More... | |
| override string | Description (string name=null, string alternative=null) |
| Fetches the description of this argument. More... | |
Public Member Functions inherited from Joutsen.ArgumentsParsing.TargetPropertyArgument< ValueType > | |
| ArgumentLiteralParser | GetParser () |
| Fetchs the literal parser for this argument. More... | |
Static Public Member Functions | |
| static ValueArgument< ValueType > | Create< TargetType, ValueType > (string name, bool required=true, ValueType defaultValue=default(ValueType), Expression< Func< TargetType, ValueType >> destination=null, string help=null) |
| Creates a new instance of a ValueArgument. More... | |
Protected Member Functions | |
| ValueArgument (ArgumentReader< ValueType > reader, string name, bool required, ValueType defaultValue, string destination, string help) | |
Protected Member Functions inherited from Joutsen.ArgumentsParsing.TargetPropertyArgument< ValueType > | |
| TargetPropertyArgument (ArgumentReader< ValueType > reader, string name, bool required, ValueType defaultValue, string destination, string help, bool isFlag) | |
| Creates a new instance of the argument. More... | |
Properties | |
| String | ValueStartDelimiter [get, set] |
| The delimiter indicating the start of the combined value. More... | |
| String | ValueEndDelimiter [get, set] |
| The delimiter indicating the end of the combined value. More... | |
| String | ValuePartsConnector [get, set] |
| A term that is used to connect the values from the input list into a single parsed one. More... | |
| bool | KeepDelimiters [get, set] |
| Determiens wether the delimiters are part of the resulting value or not. More... | |
| SimpleTypeConverter< string, ValueType > | TypeConverter [get, set] |
| The converter used to create the parsed value from the input value. More... | |
Properties inherited from Joutsen.ArgumentsParsing.TargetPropertyArgument< ValueType > | |
| String | Name [get] |
| bool | IsRequired [get] |
Additional Inherited Members | |
Protected Attributes inherited from Joutsen.ArgumentsParsing.TargetPropertyArgument< ValueType > | |
| string | helpText |
| TargetPropertyParser< ValueType > | parser |
A simple argument that parses a value from the input list.
A static class offering convenient ways to create ValueArguments.
| Joutsen.ArgumentsParsing.ValueArgument< ValueType >.ValueArgument | ( | string | name, |
| bool | required = true, |
||
| ValueType | defaultValue = default(ValueType), |
||
| string | destination = null, |
||
| string | help = null |
||
| ) |
Creates a new instance of the argument.
| name | the name of the argument |
| required | indicates wether this argument has to appear in the input list or if it is optional |
| defaultValue | the value that wil be set onthe target for this argument if it is not required and did not appear int he input list |
| destiantion | the property name of the target instance which shall recieve the parsed value. If this is null the name will be used instead. |
| help | a help text describing the parameter. It will be used to generade the description of the argument. |
|
protected |
|
static |
Creates a new instance of a ValueArgument.
| 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 |
| name | the name of the argument |
| required | indicates wether this argument has to appear in the input list or if it is optional |
| defaultValue | the value that wil be set onthe target for this argument if it is not required and did not appear int he input list |
| destiantion | 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. |
| help | a help text describing the parameter. It will be used to generade the description of the argument. |
|
virtual |
Fetches the description of this argument.
| name | for arguments that are identified by their name in the input string, the name to incorporate into the description |
| alternative | for arguments that are identified by their alternative name in the input string, the alternative name to incorporate into the description |
Reimplemented from Joutsen.ArgumentsParsing.TargetPropertyArgument< ValueType >.
|
virtual |
Fetches the usage description of this argument.
| name | for arguments that are identified by their name in the input string, the name to incorporate into the description |
Reimplemented from Joutsen.ArgumentsParsing.TargetPropertyArgument< ValueType >.
|
getset |
Determiens wether the delimiters are part of the resulting value or not.
|
getset |
The converter used to create the parsed value from the input value.
|
getset |
The delimiter indicating the end of the combined value.
|
getset |
A term that is used to connect the values from the input list into a single parsed one.
|
getset |
The delimiter indicating the start of the combined value.
1.8.13