|
Joutsen.ArgumentsParsing
v0.2.1
|
A reader that processes multiple input values into a list. More...
Public Member Functions | |
| CollectionArgumentReader (ValueCount valueCount) | |
| Creates a new instance of the reader for a certain number of elements allowed in the resulting collection using a default converter to convert list elements that implement the IConvertible interface. More... | |
| CollectionArgumentReader (ValueCount valueCount, SimpleTypeConverter< string, ValueType > converter) | |
| Creates a new instance of the reader for a certain number of elements allowed in the resulting collection using a custom converter to convert list elements to the target type. More... | |
| CollectionArgumentReader (ValueCount valueCount, SimpleTypeConverter< string, ValueType > converter, String startDelimiter, String endDelimiter, String partConnector, bool keepDelimiters) | |
| Creates a new instance using a custom converter for delimited values to produce the elements of the resulting collection. More... | |
| virtual ArgumentReadResult< CollectionType > | Read (ArgumentsIterator args, string name, int offset=0) |
| Reads literals from the input to create a collection. More... | |
Public Member Functions inherited from Joutsen.ArgumentsParsing.ArgumentReader< CollectionType > | |
| ArgumentReadResult< ValueType > | Read (ArgumentsIterator args, string name, int offset=0) |
| Reads literals from the input. More... | |
Properties | |
| ValueCount | ValueCount [get] |
| The operator or 'strategy' which determines how many values the resulting list should contain. More... | |
| String | ValueStartDelimiter [get, set] |
| The delimiter that determines the start of a delimited value. More... | |
| String | ValueEndDelimiter [get, set] |
| The delimiter that determines the end of a delimited value. More... | |
| String | ValuePartsConnector [get, set] |
| The value that is added between the different literals read from the input when reading a delimited value. More... | |
| bool | KeepDelimiters [get, set] |
| Determines if the resulting value should contain the delimiters or not. More... | |
| Set< String > | ArgumentPrefixes [get, set] |
| SimpleTypeConverter< string, ValueType > | TypeConverter [get, set] |
| The converter used to change the read literals into a different type. More... | |
Properties inherited from Joutsen.ArgumentsParsing.ArgumentReader< CollectionType > | |
| Set< String > | ArgumentPrefixes [set] |
| The prefixes of the arguments used by the parser. More... | |
A reader that processes multiple input values into a list.
| CollectionType | : | Collection<ValueType> | |
| CollectionType | : | new() |
| Joutsen.ArgumentsParsing.CollectionArgumentReader< CollectionType, ValueType >.CollectionArgumentReader | ( | ValueCount | valueCount | ) |
Creates a new instance of the reader for a certain number of elements allowed in the resulting collection using a default converter to convert list elements that implement the IConvertible interface.
| Joutsen.ArgumentsParsing.CollectionArgumentReader< CollectionType, ValueType >.CollectionArgumentReader | ( | ValueCount | valueCount, |
| SimpleTypeConverter< string, ValueType > | converter | ||
| ) |
Creates a new instance of the reader for a certain number of elements allowed in the resulting collection using a custom converter to convert list elements to the target type.
| Joutsen.ArgumentsParsing.CollectionArgumentReader< CollectionType, ValueType >.CollectionArgumentReader | ( | ValueCount | valueCount, |
| SimpleTypeConverter< string, ValueType > | converter, | ||
| String | startDelimiter, | ||
| String | endDelimiter, | ||
| String | partConnector, | ||
| bool | keepDelimiters | ||
| ) |
Creates a new instance using a custom converter for delimited values to produce the elements of the resulting collection.
|
virtual |
Reads literals from the input to create a collection.
| args | the input list of literal values represented by an iterator |
| name | the name of the argument whose values to read as found in the input |
| offset | an optional additional offset of literals where to start reading from the input |
| ValueCountException | if the number of elements provided in the input does not conform to the number determined by the 'strategy'. |
| ArgumentParseException | if a value cannot be converted to the ValueType or if a delimited value is not 'closed' correctly |
|
getset |
|
getset |
Determines if the resulting value should contain the delimiters or not.
|
getset |
The converter used to change the read literals into a different type.
|
get |
The operator or 'strategy' which determines how many values the resulting list should contain.
|
getset |
The delimiter that determines the end of a delimited value.
|
getset |
The value that is added between the different literals read from the input when reading a delimited value.
|
getset |
The delimiter that determines the start of a delimited value.
1.8.13