Show / Hide Table of Contents

# Class ValueConverter<T>

A strongly-typed IValueConverter.

##### Inheritance

Object
ValueConverter<T>
CollectionConverter<T, TCollection>
CustomObjectConverter<T>
NullableConverter<T>
AlmostVersionConverter

##### Implements

IValueConverter

##### Inherited Members

Object.ToString()
Object.Equals(Object)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()

###### Namespace: IPA.Config.Stores

###### Assembly: IPA.Loader.dll

##### Syntax

    public abstract class ValueConverter<T> : IValueConverter

##### Type Parameters

Name | Description
--- | ---
T | the type of object to handle

### Methods

| Improve this Doc View Source

#### FromValue(Value, Object)

Converts the given Value to the object type handled by this converter.

##### Declaration

    public abstract T FromValue(Value value, object parent)

##### Parameters

Type | Name | Description
--- | --- | ---
Value | value | the Value to deserialize
Object | parent | the object that will own the result

##### Returns

Type | Description
--- | ---
T | the deserialized object

##### See Also

FromValue(Value, Object)
| Improve this Doc View Source

#### ToValue(T, Object)

Converts the given object to a Value.

##### Declaration

    public abstract Value ToValue(T obj, object parent)

##### Parameters

Type | Name | Description
--- | --- | ---
T | obj | the object to convert
Object | parent | the owning object of `obj`

##### Returns

Type | Description
--- | ---
Value | a representation of `obj` as a Value structure

##### See Also

ToValue(Object, Object)

### Explicit Interface Implementations

| Improve this Doc View Source

#### IValueConverter.FromValue(Value, Object)

##### Declaration

    object IValueConverter.FromValue(Value value, object parent)

##### Parameters

Type | Name | Description
--- | --- | ---
Value | value |
Object | parent |

##### Returns

Type | Description
--- | ---
Object |

| Improve this Doc View Source

#### IValueConverter.ToValue(Object, Object)

##### Declaration

    Value IValueConverter.ToValue(object obj, object parent)

##### Parameters

Type | Name | Description
--- | --- | ---
Object | obj |
Object | parent |

##### Returns

Type | Description
--- | ---
Value |

| Improve this Doc View Source

#### IValueConverter.Type

##### Declaration

    Type IValueConverter.Type { get; }

##### Returns

Type | Description
--- | ---
Type |

### Implements

IValueConverter

### Extension Methods

ReflectionUtil.SetField<T, U>(T, String, U)
ReflectionUtil.GetField<U, T>(T, String)
ReflectionUtil.SetProperty<T, U>(T, String, U)
ReflectionUtil.GetProperty<U, T>(T, String)
ReflectionUtil.InvokeMethod<U, T>(T, String, Object[])

### See Also

IValueConverter