ByteArraySerializer Class
Namespace: Stride.Core.Serialization.SerializersAssembly: Stride.Core.dll
Implements DataSerializer<T> for a byte array.
Derived from ByteArraySerializer:
[DataSerializerGlobal(typeof(ByteArraySerializer), null, DataSerializerGenericMode.None, false, false)]
public class ByteArraySerializer : DataSerializer<byte[]>
Name | Description | |
---|---|---|
Methods | ||
PreSerialize(ref Byte[], ArchiveMode, SerializationStream) | Performs the first step of serialization or deserialization. |
|
Serialize(ref Byte[], ArchiveMode, SerializationStream) | Serializes or deserializes the given object |
Methods
PreSerialize(ref Byte[], ArchiveMode, SerializationStream)
Performs the first step of serialization or deserialization.
public override void PreSerialize(ref byte[] obj, ArchiveMode mode, SerializationStream stream)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | obj | |
ArchiveMode | mode | The serialization mode. |
SerializationStream | stream | The stream to serialize or deserialize to. |
Overrides
Stride.Core.Serialization.DataSerializer<System.Byte[]>.PreSerialize(System.Byte[], Stride.Core.Serialization.ArchiveMode, Stride.Core.Serialization.SerializationStream)
Remarks
Typically, it will instantiate the object if [null], and if it's a collection clear it.
Serialize(ref Byte[], ArchiveMode, SerializationStream)
Serializes or deserializes the given object obj
.
public override void Serialize(ref byte[] obj, ArchiveMode mode, SerializationStream stream)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | obj | |
ArchiveMode | mode | The serialization mode. |
SerializationStream | stream | The stream to serialize or deserialize to. |
Overrides
Stride.Core.Serialization.DataSerializer<System.Byte[]>.Serialize(System.Byte[], Stride.Core.Serialization.ArchiveMode, Stride.Core.Serialization.SerializationStream)