-
Notifications
You must be signed in to change notification settings - Fork 0
IStartOptionValueParser
Lunar Doggo edited this page Jul 24, 2021
·
1 revision
Implementations of IStartOptionValueParser
are used to parse values for StartOptions
public interface IStartOptionValueParser
Signature | Description |
---|---|
object[] ParseValues(string[] values) |
Parses multiple values into an object array and returns the result |
object ParseValue(string value) |
Parses one value into an object and returns the result |
This interface is further abstracted by the abstract class AbstractStartOptionValueParser
which provides a first layer of parsing-handling by boiling the two methods of IStartOptionValueParser
into a single method that has to be overridden by inheriting classes:
protected abstract object ParseSingleValue(string value)
If an exception occurs, the class will bubble it upwards as an ArgumentException
There also a few implementations of the interface provided by the library:
Parsed type | Alias | Parser |
---|---|---|
Boolean | bool | BoolOptionValueParser |
Byte | byte | ByteOptionValueParser |
Single | float | FloatOptionValueParser |
Double | double | DoubleOptionValueParser |
Int16 | short | Int16OptionValueParser |
Int32 | int | Int32OptionValueParser |
Int64 | long | Int64OptionValueParser |