Search Results for

Show / Hide Table of Contents

# Class CustomObjectConverter<T>

A ValueConverter<T> for objects normally serialized to config via Generated<T>(Config, Boolean).

##### Inheritance

Object
ValueConverter<T>
CustomObjectConverter<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 CustomObjectConverter<T> : ValueConverter<T>, IValueConverter where T : class

##### Type Parameters

Name | Description
--- | ---
T | the same type parameter that would be passed into Generated<T>(Config, Boolean)

### 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, Object)

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

##### Declaration

    public static Value Serialize(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`

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

### See Also

Generated<T>(Config, Boolean)