Esempio n. 1
0
 public override void WriteManifest(Stream stream, Type type, SerializerSession session)
 {
     if (session.ShouldWriteTypeManifest(type))
     {
         stream.WriteByte(Manifest);
     }
     else
     {
         var typeIdentifier = session.GetTypeIdentifier(type);
         stream.Write(new[] { ObjectSerializer.ManifestIndex });
         stream.WriteUInt16((ushort)typeIdentifier);
     }
 }
Esempio n. 2
0
 public override void WriteManifest(Stream stream, Type type, SerializerSession session)
 {
     if (session.ShouldWriteTypeManifest(type))
     {
         stream.WriteByte(Manifest);
     }
     else
     {
         var typeIdentifier = session.GetTypeIdentifier(type);
         stream.Write(new[] { ObjectSerializer.ManifestIndex });
         stream.WriteUInt16((ushort) typeIdentifier);
     }
 }