Version 2.1.0.0

KeyValuePairFormatter<TKey, TValue> class

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

Type Parameters

TKey

The type of the key.

TValue

The type of the value.

Constructors

KeyValuePairFormatter()
public KeyValuePairFormatter()

Methods

DeserializeImplementation(ref KeyValuePair<TKey, TValue>, IDataReader)
Provides the actual implementation for deserializing a value of type .
protected override void DeserializeImplementation(ref KeyValuePair<TKey, TValue> value, IDataReader reader)
Parameters
System.Collections.Generic.KeyValuePair<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.

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

The value to serialize.

Sirenix.Serialization.IDataWriter writer

The writer to serialize with.