private void WriteObjectWorker(IObjectWritable writable) { // emit object header up front _objectReferenceMap.Add(writable); _writer.Write((byte)EncodingKind.Object); // Directly write out the type-id for this object. i.e. no need to write out the 'Type' // tag since we just wrote out the 'Object' tag this.WriteInt32(_binderSnapshot.GetTypeId(writable.GetType())); writable.WriteTo(this); }
private void WriteWritableObject(IObjectWritable instance) { _writer.Write((byte)DataKind.Object_W); Type type = instance.GetType(); this.WriteType(type); _binder?.Record(instance); instance.WriteTo(this); }
private void WriteWritableObject(IObjectWritable instance) { writer.Write((byte)DataKind.Object_W); Type type = instance.GetType(); this.WriteType(type); if (this.binder != null) { this.binder.Record(instance); } instance.WriteTo(this); }