Class EnumConverter
Argument converter for any type of enum.
Inheritance
System.Object
EnumConverter
Implements
Namespace: TehGM.Wolfringo.Commands.Parsing.ArgumentConverters
Assembly: Wolfringo.Commands.dll
Syntax
public class EnumConverter : IArgumentConverter
Properties
| Improve this Doc View SourceIgnoreCase
Whether case should be ignored when parsing enum value.
Declaration
public bool IgnoreCase { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Remarks
Defaults to true.
Methods
| Improve this Doc View SourceCanConvert(ParameterInfo)
Determines whether this converter can convert an argument to given parameter.
Declaration
public bool CanConvert(ParameterInfo parameter)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.ParameterInfo | parameter | Parameter to convert the argument to. |
Returns
Type | Description |
---|---|
System.Boolean | True if this converter can be used for the conversion; otherwise false. |
Convert(ParameterInfo, String)
Converts an argument to given parameter.
Declaration
public object Convert(ParameterInfo parameter, string arg)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.ParameterInfo | parameter | Parameter to convert the argument to. |
System.String | arg | Argument to convert. |
Returns
Type | Description |
---|---|
System.Object | Argument converted to given type. |