4 using System.Collections.Generic;
7 using System.Threading.Tasks;
8 using SiliconStudio.Core.IO;
9 using SiliconStudio.Core.Serialization.Serializers;
11 namespace SiliconStudio.Core.Serialization.Contents
24 public const int NullIdentifier = -1;
37 public override bool Equals(
object obj)
39 if (ReferenceEquals(null, obj))
return false;
47 return (Location.GetHashCode()*397) ^
ObjectType.GetHashCode();
53 return left.Equals(right);
58 return !left.Equals(right);
63 public override Type SerializationType
68 public override void Serialize(ref ChunkReference chunkReference,
ArchiveMode mode, SerializationStream stream)
72 stream.Write(chunkReference.ObjectType.AssemblyQualifiedName);
73 stream.Write(chunkReference.Location);
77 string typeName = stream.ReadString();
78 chunkReference =
new ChunkReference(
Type.GetType(typeName), stream.ReadString());
ChunkReference(Type objectType, string location)
override bool Equals(object obj)
bool Equals(ChunkReference other)
The type of the serialized type will be passed as a generic arguments of the serializer. Example: serializer of A becomes instantiated as Serializer{A}.
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).
Describe a reference between an object and another.
override int GetHashCode()