public static void Serialize(Stream stream, ObjectAddress instance)
 {
     if (instance.Host == null)
     {
         throw new ArgumentNullException("Host", "Required by proto specification.");
     }
     stream.WriteByte(10);
     ProtocolParser.WriteUInt32(stream, instance.Host.GetSerializedSize());
     ProcessId.Serialize(stream, instance.Host);
     if (instance.HasObjectId)
     {
         stream.WriteByte(16);
         ProtocolParser.WriteUInt64(stream, instance.ObjectId);
     }
 }
Пример #2
0
 public void Serialize(Stream stream)
 {
     ProcessId.Serialize(stream, this);
 }