4 using System.Runtime.CompilerServices;
5 using SiliconStudio.Core.Storage;
7 namespace SiliconStudio.Core.Serialization
16 public const int BinaryFormatVersion = 1;
21 public abstract Type SerializationType {
get; }
24 public abstract bool IsBlittable {
get; }
40 public override Type SerializationType {
get {
return typeof(T); } }
43 public override bool IsBlittable {
get {
return false; } }
48 var objT = (obj == null ?
default(T) : (T)obj);
54 [MethodImpl(MethodImplOptions.AggressiveInlining)]
63 var objT = (obj == null ?
default(T) : (T)obj);
64 PreSerialize(ref objT, mode, stream);
void Serialize(T obj, SerializationStream stream)
virtual void PreSerialize(ref T obj, ArchiveMode mode, SerializationStream stream)
override void PreSerialize(ref object obj, ArchiveMode mode, SerializationStream stream)
ObjectId SerializationTypeId
Base class for implementation of SerializationStream.
override void Serialize(ref object obj, ArchiveMode mode, SerializationStream stream)
A hash to uniquely identify data.
Describes how to serialize and deserialize an object without knowing its type. Used as a common base ...
ArchiveMode
Enumerates the different mode of serialization (either serialization or deserialization).