Search Results for

Show / Hide Table of Contents

# Class IReadOnlyDictionaryConverter<TValue>

A converter for instances of IReadOnlyDictionary<TKey,TValue>.

##### Inheritance

Object
ValueConverter<IReadOnlyDictionary<String, TValue>>
IReadOnlyDictionaryConverter<TValue>
IReadOnlyDictionaryConverter<TValue, TConverter>

##### Implements

IValueConverter

##### Inherited Members

ValueConverter<IReadOnlyDictionary<String, TValue>>.ToValue(IReadOnlyDictionary<String, TValue>, Object)
ValueConverter<IReadOnlyDictionary<String, TValue>>.FromValue(Value, Object)
ValueConverter<IReadOnlyDictionary<String, TValue>>.IValueConverter.ToValue(Object, Object)
ValueConverter<IReadOnlyDictionary<String, TValue>>.IValueConverter.FromValue(Value, Object)
ValueConverter<IReadOnlyDictionary<String, TValue>>.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 IReadOnlyDictionaryConverter<TValue> : ValueConverter<IReadOnlyDictionary<string, TValue>>, IValueConverter

##### Type Parameters

Name | Description
--- | ---
TValue | the value type of the dictionary

### Constructors

| Improve this Doc View Source

#### IReadOnlyDictionaryConverter()

Constructs an IReadOnlyDictionaryConverter<TValue> using the default converter for the value type.

##### Declaration

    public IReadOnlyDictionaryConverter()

| Improve this Doc View Source

#### IReadOnlyDictionaryConverter(ValueConverter<TValue>)

Constructs an IReadOnlyDictionaryConverter<TValue> using the specified converter for the value.

##### Declaration

    public IReadOnlyDictionaryConverter(ValueConverter<TValue> converter)

##### Parameters

Type | Name | Description
--- | --- | ---
ValueConverter<TValue> | converter | the converter for the value

### Properties

| Improve this Doc View Source

#### BaseConverter

Gets the converter for the dictionary's value type.

##### Declaration

    protected ValueConverter<TValue> BaseConverter { get; }

##### Property Value

Type | Description
--- | ---
ValueConverter<TValue> |

### Methods

| Improve this Doc View Source

#### FromValue(Value, Object)

Converts a Map to an IDictionary<TKey,TValue> that is represented by it.

##### Declaration

    public override IReadOnlyDictionary<string, TValue> FromValue(Value value, object parent)

##### Parameters

Type | Name | Description
--- | --- | ---
Value | value | the Map to convert
Object | parent | the parent that will own the resulting object

##### Returns

Type | Description
--- | ---
IReadOnlyDictionary<String, TValue> | the deserialized dictionary

##### Overrides

IPA.Config.Stores.ValueConverter<System.Collections.Generic.IReadOnlyDictionary<System.String, TValue>>.FromValue(IPA.Config.Data.Value, System.Object)
| Improve this Doc View Source

#### ToValue(IReadOnlyDictionary<String, TValue>, Object)

Serializes an IDictionary<TKey,TValue> into a Map containing its values.

##### Declaration

    public override Value ToValue(IReadOnlyDictionary<string, TValue> obj, object parent)

##### Parameters

Type | Name | Description
--- | --- | ---
IReadOnlyDictionary<String, TValue> | obj | the dictionary to serialize
Object | parent | the object that owns the dictionary

##### Returns

Type | Description
--- | ---
Value | the dictionary serialized as a Map

##### Overrides

IPA.Config.Stores.ValueConverter<System.Collections.Generic.IReadOnlyDictionary<System.String, TValue>>.ToValue(System.Collections.Generic.IReadOnlyDictionary<System.String, TValue>, System.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[])