Version 3.3.0.1

DictionaryFormatter<TKey, TValue> class

Namespace: Sirenix.Serialization
Assembly: Sirenix.Serialization
public sealed class DictionaryFormatter<TKey, TValue> : BaseFormatter<Dictionary<TKey, TValue>>, IFormatter<Dictionary<TKey, TValue>>, IFormatter
Custom generic formatter for the generic type definition System.Collections.Generic.Dictionary<TKey, TValue>.
Inheritance
  • System.Object
  • BaseFormatter<System.Collections.Generic.Dictionary<TKey, TValue>>
  • DictionaryFormatter<TKey, TValue>

Type Parameters

TKey

The type of the dictionary key.

TValue

The type of the dictionary value.

Constructors

DictionaryFormatter()
Creates a new instance of DictionaryFormatter<TKey, TValue>.
public DictionaryFormatter()

Methods

DeserializeImplementation(ref Dictionary<TKey, TValue>, IDataReader)
Provides the actual implementation for deserializing a value of type .
protected override void DeserializeImplementation(ref Dictionary<TKey, TValue> value, IDataReader reader)
Parameters
System.Collections.Generic.Dictionary<TKey, TValue> value

The uninitialized value to serialize into. This value will have been created earlier using GetUninitializedObject().

Sirenix.Serialization.IDataReader reader

The reader to deserialize with.

GetUninitializedObject()
Returns null.
protected override Dictionary<TKey, TValue> GetUninitializedObject()
Returns
System.Collections.Generic.Dictionary<TKey, TValue>

A value of null.

SerializeImplementation(ref Dictionary<TKey, TValue>, IDataWriter)
Provides the actual implementation for serializing a value of type .
protected override void SerializeImplementation(ref Dictionary<TKey, TValue> value, IDataWriter writer)
Parameters
System.Collections.Generic.Dictionary<TKey, TValue> value

The value to serialize.

Sirenix.Serialization.IDataWriter writer

The writer to serialize with.