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
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
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 SourceFromValue(Value, Object)
Declaration
public override T FromValue(Value value, object parent)
Parameters
| Type | Name | Description |
|---|---|---|
| Value | value | the Value to convert |
| System.Object | parent | the object which will own the created object |
Returns
| Type | Description |
|---|---|
| T | the deserialized enum value |
Overrides
IPA.Config.Stores.ValueConverter<T>.FromValue(IPA.Config.Data.Value, System.Object)
Exceptions
| Type | Condition |
|---|---|
| System.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 |
| System.Object | parent | the object which owns |
Returns
| Type | Description |
|---|---|
| Value | a Text node representing |
Overrides
IPA.Config.Stores.ValueConverter<T>.ToValue(T, System.Object)