Class DictionaryConverter<TValue> +
+A converter for instances of Dictionary<TKey,TValue>.
+Inheritance
+ + +Implements
+ +Inherited Members
+ + + + + + + + + + +Namespace: IPA.Config.Stores.Converters
+Assembly: IPA.Loader.dll
+Syntax
+public class DictionaryConverter<TValue> : ValueConverter<Dictionary<string, TValue>>, IValueConverter
+ Type Parameters
+Name | +Description | +
---|---|
TValue | +the value type of the dictionary + |
+
Constructors +
+ + | + Improve this Doc + + + View Source + + +DictionaryConverter()
+Constructs an IDictionaryConverter<TValue> using the default converter for the value type.
+Declaration
+public DictionaryConverter()
+ DictionaryConverter(ValueConverter<TValue>)
+Constructs an IDictionaryConverter<TValue> using the specified converter for the value.
+Declaration
+public DictionaryConverter(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 a Dictionary<TKey,TValue> that is represented by it.
+Declaration
+public override Dictionary<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 | +
---|---|
Dictionary<String, TValue> | +the deserialized dictionary + |
+
Overrides
+ToValue(Dictionary<String, TValue>, Object)
+Serializes a Dictionary<TKey,TValue> into a Map containing its values.
+Declaration
+public override Value ToValue(Dictionary<string, TValue> obj, object parent)
+ Parameters
+Type | +Name | +Description | +
---|---|---|
Dictionary<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 + |
+