Class CaseInsensitiveEnumConverter<T> +
+A converter for an enum of type T
, that converts the enum to its string representation and back,
+ignoring the case of the serialized value for deseiralization.
Implements
+ +Inherited Members
+ + + + + + + + +Namespace: IPA.Config.Stores.Converters
+Assembly: IPA.Loader.dll
+Syntax
+public sealed class CaseInsensitiveEnumConverter<T> : ValueConverter<T>, IValueConverter where T : Enum
+ Type Parameters
+Name | +Description | +
---|---|
T | +the enum type + |
+
Methods +
+ + | + Improve this Doc + + + View Source + + +FromValue(Value, Object)
+ + +Declaration
+public override T FromValue(Value value, object parent)
+ Parameters
+Type | +Name | +Description | +
---|---|---|
Value | +value | +the Value to convert + |
+
Object | +parent | +the object which will own the created object + |
+
Returns
+Type | +Description | +
---|---|
T | +the deserialized enum value + |
+
Overrides
+Exceptions
+Type | +Condition | +
---|---|
ArgumentException | +if |
+
ToValue(T, Object)
+Converts an enum of type T
to a Value node corresponding to its value.
Declaration
+public override Value ToValue(T obj, object parent)
+ Parameters
+Type | +Name | +Description | +
---|---|---|
T | +obj | +the value to serialize + |
+
Object | +parent | +the object which owns |
+
Returns
+Type | +Description | +
---|---|
Value | +a Text node representing |
+