Class ValueTupleSerializer<T1, T2>
- Namespace
- Stride.Core.Serialization.Serializers
- Assembly
- Stride.Core.dll
Serializer for a 2-value tuple.
[DataSerializerGlobal(typeof(ValueTupleSerializer<,>), typeof(ValueTuple<,>), DataSerializerGenericMode.GenericArguments, false, false)]
public class ValueTupleSerializer<T1, T2> : DataSerializer<(T1, T2)>
Type Parameters
T1
The type of the tuple's component 1.
T2
The type of the tuple's component 2.
- Inheritance
-
DataSerializer<(T1, T2)>ValueTupleSerializer<T1, T2>
- Inherited Members
Methods
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.
Serialize(ref (T1, T2), ArchiveMode, SerializationStream)
Serializes or deserializes the given object obj
.
public override void Serialize(ref (T1, T2) obj, ArchiveMode mode, SerializationStream stream)
Parameters
obj
(T1, T2)The object to serialize or deserialize.
mode
ArchiveModeThe serialization mode.
stream
SerializationStreamThe stream to serialize or deserialize to.