DataSerializer<T> Class
Namespace: Stride.Core.SerializationAssembly: Stride.Core.dll
Describes how to serialize and deserialize an object of a given type.
public abstract class DataSerializer<T> : DataSerializer
Type Parameters
| Name | Description |
|---|---|
| T | The type of object to serialize or deserialize. |
| Name | Description | |
|---|---|---|
| Properties | ||
| IsBlittable | ||
| SerializationType | The type of the object that can be serialized or deserialized. |
|
| Methods | ||
| PreSerialize(ref T, ArchiveMode, SerializationStream) | Performs the first step of serialization or deserialization. |
|
| PreSerialize(ref Object, ArchiveMode, SerializationStream) | Performs the first step of serialization or deserialization. |
|
| Serialize(T, SerializationStream) | Serializes the given object |
|
| Serialize(ref T, ArchiveMode, SerializationStream) | Serializes or deserializes the given object |
|
| Serialize(ref Object, ArchiveMode, SerializationStream) | Serializes or deserializes the given object |
|
Properties
IsBlittable
public override bool IsBlittable { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Overrides
SerializationType
The type of the object that can be serialized or deserialized.
public override Type SerializationType { get; }
Property Value
| Type | Description |
|---|---|
| System.Type |
Overrides
| Improve this Doc View SourceMethods
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
| Type | Name | Description |
|---|---|---|
| T | obj | The object to process. |
| ArchiveMode | mode | The serialization mode. |
| SerializationStream | stream | 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 Object, ArchiveMode, SerializationStream)
Performs the first step of serialization or deserialization.
public override void PreSerialize(ref object obj, ArchiveMode mode, SerializationStream stream)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | obj | The object to process. |
| ArchiveMode | mode | The serialization mode. |
| SerializationStream | stream | The stream to serialize or deserialize to. |
Overrides
Remarks
Typically, it will instantiate the object if [null], and if it's a collection clear it.
Serialize(T, SerializationStream)
Serializes the given object obj.
public void Serialize(T obj, SerializationStream stream)
Parameters
| Type | Name | Description |
|---|---|---|
| T | obj | The object to serialize or deserialize. |
| SerializationStream | stream | 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
| Type | Name | Description |
|---|---|---|
| T | obj | The object to serialize or deserialize. |
| ArchiveMode | mode | The serialization mode. |
| SerializationStream | stream | The stream to serialize or deserialize to. |
Serialize(ref Object, ArchiveMode, SerializationStream)
Serializes or deserializes the given object obj.
public override void Serialize(ref object obj, ArchiveMode mode, SerializationStream stream)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | obj | The object to serialize or deserialize. |
| ArchiveMode | mode | The serialization mode. |
| SerializationStream | stream | The stream to serialize or deserialize to. |