Class SortedListSerializer<TKey, TValue>
- Namespace
- Stride.Core.Serialization.Serializers
- Assembly
- Stride.Core.dll
Data serializer for SortedList{TKey, TValue}.
[DataSerializerGlobal(typeof(SortedListSerializer<,>), typeof(SortedList<,>), DataSerializerGenericMode.GenericArguments, false, false)]
public class SortedListSerializer<TKey, TValue> : DataSerializer<SortedList<TKey, TValue>>, IDataSerializerGenericInstantiation
Type Parameters
TKey
The type of the key in SortedList{TKey, TValue}.
TValue
The type of the value in SortedList{TKey, TValue}.
- Inheritance
-
DataSerializer<SortedList<TKey, TValue>>SortedListSerializer<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
serializerSelector
SerializerSelectorgenericInstantiations
IList<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
serializerSelector
SerializerSelectorThe serializer.
Remarks
This method should be thread-safe and OK to call multiple times.
PreSerialize(ref SortedList<TKey, TValue>, ArchiveMode, SerializationStream)
Performs the first step of serialization or deserialization.
public override void PreSerialize(ref SortedList<TKey, TValue> obj, ArchiveMode mode, SerializationStream stream)
Parameters
obj
SortedList<TKey, TValue>The object to process.
mode
ArchiveModeThe serialization mode.
stream
SerializationStreamThe stream to serialize or deserialize to.
Remarks
Typically, it will instantiate the object if [null], and if it's a collection clear it.
Serialize(ref SortedList<TKey, TValue>, ArchiveMode, SerializationStream)
Serializes or deserializes the given object obj
.
public override void Serialize(ref SortedList<TKey, TValue> obj, ArchiveMode mode, SerializationStream stream)
Parameters
obj
SortedList<TKey, TValue>The object to serialize or deserialize.
mode
ArchiveModeThe serialization mode.
stream
SerializationStreamThe stream to serialize or deserialize to.