4 using SiliconStudio.Core.Storage;
5 using SiliconStudio.Core.Serialization.Serializers;
7 namespace SiliconStudio.Core.Serialization.Assets
10 [DataSerializer(typeof(ObjectUrl.Serializer))]
16 public readonly
string Path;
21 throw new ArgumentException(
"path");
29 return Type == other.Type && string.Equals(Path, other.Path);
32 public override bool Equals(
object obj)
34 if (ReferenceEquals(null, obj))
return false;
42 return ((
int)
Type * 397) ^ Path.GetHashCode();
48 return left.Equals(right);
53 return !left.Equals(right);
67 stream.Write(obj.Type);
68 stream.Write(obj.Path);
72 var type = stream.Read<
UrlType>();
73 var path = stream.ReadString();
74 obj =
new ObjectUrl(type, path);
override bool Equals(object obj)
override string ToString()
Base class for implementation of SerializationStream.
bool Equals(ObjectUrl 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}.
override int GetHashCode()
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).
ObjectUrl(UrlType type, string path)