Table of Contents

Class DataSerializer<T>

Namespace
Stride.Core.Serialization
Assembly
Stride.Core.dll

Describes how to serialize and deserialize an object of a given type.

public abstract class DataSerializer<T> : DataSerializer

Type Parameters

T

The type of object to serialize or deserialize.

Inheritance
DataSerializer<T>
Derived
Inherited Members

Properties

IsBlittable

public override bool IsBlittable { get; }

Property Value

bool

SerializationType

The type of the object that can be serialized or deserialized.

public override Type SerializationType { get; }

Property Value

Type

Methods

PreSerialize(ref object, ArchiveMode, SerializationStream)

Performs the first step of serialization or deserialization.

public override void PreSerialize(ref object obj, ArchiveMode mode, SerializationStream stream)

Parameters

obj object

The object to process.

mode ArchiveMode

The serialization mode.

stream SerializationStream

The stream to serialize or deserialize to.

Remarks

Typically, it will instantiate the object if [null], and if it's a collection clear it.

PreSerialize(ref T, ArchiveMode, SerializationStream)

Performs the first step of serialization or deserialization.

public virtual void PreSerialize(ref T obj, ArchiveMode mode, SerializationStream stream)

Parameters

obj T

The object to process.

mode ArchiveMode

The serialization mode.

stream SerializationStream

The 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 object, ArchiveMode, SerializationStream)

Serializes or deserializes the given object obj.

public override void Serialize(ref object obj, ArchiveMode mode, SerializationStream stream)

Parameters

obj object

The object to serialize or deserialize.

mode ArchiveMode

The serialization mode.

stream SerializationStream

The stream to serialize or deserialize to.

Serialize(T, SerializationStream)

Serializes the given object obj.

public void Serialize(T obj, SerializationStream stream)

Parameters

obj T

The object to serialize or deserialize.

stream SerializationStream

The stream to serialize or deserialize to.

Serialize(ref T, ArchiveMode, SerializationStream)

Serializes or deserializes the given object obj.

public abstract void Serialize(ref T obj, ArchiveMode mode, SerializationStream stream)

Parameters

obj T

The object to serialize or deserialize.

mode ArchiveMode

The serialization mode.

stream SerializationStream

The stream to serialize or deserialize to.