Class KeyValuePairSerializer<TKey, TValue>
- Namespace
- Stride.Core.Serialization.Serializers
- Assembly
- Stride.Core.dll
Data serializer for KeyValuePair{TKey, TValue}.
[DataSerializerGlobal(typeof(KeyValuePairSerializer<,>), typeof(KeyValuePair<,>), DataSerializerGenericMode.GenericArguments, false, false)]
public class KeyValuePairSerializer<TKey, TValue> : DataSerializer<KeyValuePair<TKey, TValue>>, IDataSerializerGenericInstantiation
Type Parameters
TKeyThe type of the key in KeyValuePair{TKey, TValue}.
TValueThe type of the value in KeyValuePair{TKey, TValue}.
- Inheritance
-
objectDataSerializer<KeyValuePair<TKey, TValue>>KeyValuePairSerializer<TKey, TValue>
- Implements
- Inherited Members
Methods
EnumerateGenericInstantiations(SerializerSelector, IList<Type>)
Enumerates required DataSerializer required by this instance of DataSerializer.
public void EnumerateGenericInstantiations(SerializerSelector serializerSelector, IList<Type> genericInstantiations)
Parameters
serializerSelectorSerializerSelectorgenericInstantiationsIList<Type>
Remarks
The code won't be executed, it will only be scanned for typeof() operands by the assembly processor. Null is authorized in enumeration (for now).
Initialize(SerializerSelector)
Initializes the specified serializer.
public override void Initialize(SerializerSelector serializerSelector)
Parameters
serializerSelectorSerializerSelectorThe serializer.
Remarks
This method should be thread-safe and OK to call multiple times.
Serialize(ref KeyValuePair<TKey, TValue>, ArchiveMode, SerializationStream)
Serializes or deserializes the given object obj.
public override void Serialize(ref KeyValuePair<TKey, TValue> obj, ArchiveMode mode, SerializationStream stream)
Parameters
objKeyValuePair<TKey, TValue>The object to serialize or deserialize.
modeArchiveModeThe serialization mode.
streamSerializationStreamThe stream to serialize or deserialize to.