ValueTupleSerializer<T1, T2> Class
Namespace: Stride.Core.Serialization.SerializersAssembly: Stride.Core.dll
Serializer for a 2-value tuple.
System.Object → DataSerializer → DataSerializer<System.ValueTuple<T1, T2>> →
ValueTupleSerializer<T1, T2>
Derived from ValueTupleSerializer<T1, T2>:
[DataSerializerGlobal(typeof(ValueTupleSerializer<, >), typeof(ValueTuple<, >), DataSerializerGenericMode.GenericArguments, false, false)]
public class ValueTupleSerializer<T1, T2> : DataSerializer<(T1, T2)>
Type Parameters
Name | Description |
---|---|
T1 | The type of the tuple's component 1. |
T2 | The type of the tuple's component 2. |
Name | Description | |
---|---|---|
Methods | ||
Initialize(SerializerSelector) | Initializes the specified serializer. |
|
Serialize(ref (T1, T2), ArchiveMode, SerializationStream) | Serializes or deserializes the given object |
Methods
Initialize(SerializerSelector)
Initializes the specified serializer.
public override void Initialize(SerializerSelector serializerSelector)
Parameters
Type | Name | Description |
---|---|---|
SerializerSelector | serializerSelector | The serializer. |
Overrides
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
Type | Name | Description |
---|---|---|
System.ValueTuple<T1, T2> | obj | |
ArchiveMode | mode | The serialization mode. |
SerializationStream | stream | The stream to serialize or deserialize to. |
Overrides
Stride.Core.Serialization.DataSerializer<System.ValueTuple<T1, T2>>.Serialize(System.ValueTuple<T1, T2>, Stride.Core.Serialization.ArchiveMode, Stride.Core.Serialization.SerializationStream)