Show / Hide Table of Contents

# Class CustomValueTypeConverter<T>

A ValueConverter<T> for custom value types, serialized identically to the reference types serialized with Generated<T>(Config, Boolean).

##### Inheritance

Object
ValueConverter<T>
CustomValueTypeConverter<T>

##### Implements

IValueConverter

##### Inherited Members

ValueConverter<T>.IValueConverter.ToValue(Object, Object)
ValueConverter<T>.IValueConverter.FromValue(Value, Object)
ValueConverter<T>.IValueConverter.Type
Object.ToString()
Object.Equals(Object)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()

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

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

##### Syntax

    public class CustomValueTypeConverter<T> : ValueConverter<T>, IValueConverter where T : struct

##### Type Parameters

Name | Description
--- | ---
T | the type of the value to convert

### Methods

| Improve this Doc View Source

#### Deserialize(Value, Object)

Deserializes `value` into a `T` with the given `parent`.

##### Declaration

    public static T Deserialize(Value value, object parent)

##### Parameters

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

##### Returns

Type | Description
--- | ---
T | the deserialized value

##### See Also

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

#### FromValue(Value, Object)

Deserializes `value` into a `T` with the given `parent`.

##### Declaration

    public override T FromValue(Value value, object parent)

##### Parameters

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

##### Returns

Type | Description
--- | ---
T | the deserialized value

##### Overrides

IPA.Config.Stores.ValueConverter<T>.FromValue(IPA.Config.Data.Value, System.Object)

##### See Also

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

#### Serialize(T)

Serializes `obj` into a corresponding Value structure.

##### Declaration

    public static Value Serialize(T obj)

##### Parameters

Type | Name | Description
--- | --- | ---
T | obj | the object to serialize

##### Returns

Type | Description
--- | ---
Value | the Value tree that represents `obj`

##### See Also

ToValue(T, Object)
| Improve this Doc View Source

#### ToValue(T, Object)

Serializes `obj` into a Value structure, given `parent`.

##### Declaration

    public override Value ToValue(T obj, object parent)

##### Parameters

Type | Name | Description
--- | --- | ---
T | obj | the object to serialize
Object | parent | the parent object that owns `obj`

##### Returns

Type | Description
--- | ---
Value | the Value tree that represents `obj`

##### Overrides

IPA.Config.Stores.ValueConverter<T>.ToValue(T, System.Object)

##### See Also

ToValue(T, Object)

### 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[])