Class ValueOption
Helps build value options.
public static class ValueOption
- Inheritance
-
ValueOption
- Inherited Members
Methods
CreateInt32Option(OptionForm, int)
Creates a 32-bit signed integer option that takes a single form.
public static ValueOption<int> CreateInt32Option(OptionForm form, int defaultValue)
Parameters
formOptionFormThe 32-bit signed integer option's form.
defaultValueintThe default value for the option.
Returns
- ValueOption<int>
A 32-bit signed integer option.
CreateInt32Option(IReadOnlyList<OptionForm>, int)
Creates a 32-bit signed integer option that takes a list of forms.
public static ValueOption<int> CreateInt32Option(IReadOnlyList<OptionForm> forms, int defaultValue)
Parameters
formsIReadOnlyList<OptionForm>The 32-bit signed integer option's forms.
defaultValueintThe default value for the option.
Returns
- ValueOption<int>
A 32-bit signed integer option.
CreateOption<T>(OptionForm, Func<OptionForm, string, ILog, T>, T)
Creates a typed option that takes a single form.
public static ValueOption<T> CreateOption<T>(OptionForm form, Func<OptionForm, string, ILog, T> parseArgument, T defaultValue)
Parameters
formOptionFormThe option's form.
parseArgumentFunc<OptionForm, string, ILog, T>A function that parses the option's argument.
defaultValueTThe default value for the option.
Returns
- ValueOption<T>
A typed option.
Type Parameters
TThe parsed value type.
CreateOption<T>(IReadOnlyList<OptionForm>, Func<OptionForm, string, ILog, T>, T)
Creates a typed option that takes a list of forms.
public static ValueOption<T> CreateOption<T>(IReadOnlyList<OptionForm> forms, Func<OptionForm, string, ILog, T> parseArgument, T defaultValue)
Parameters
formsIReadOnlyList<OptionForm>The option's forms.
parseArgumentFunc<OptionForm, string, ILog, T>A function that parses the option's argument.
defaultValueTThe default value for the option.
Returns
- ValueOption<T>
A typed option.
Type Parameters
TThe parsed value type.
CreateStringOption(OptionForm, string)
Creates a string option that takes a single form.
public static ValueOption<string> CreateStringOption(OptionForm form, string defaultValue)
Parameters
formOptionFormThe string option's form.
defaultValuestringThe default value for the option.
Returns
- ValueOption<string>
A string option.
CreateStringOption(IReadOnlyList<OptionForm>, string)
Creates a string option that takes a list of forms.
public static ValueOption<string> CreateStringOption(IReadOnlyList<OptionForm> forms, string defaultValue)
Parameters
formsIReadOnlyList<OptionForm>The string option's forms.
defaultValuestringThe default value for the option.
Returns
- ValueOption<string>
A string option.