Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        private void WriteWritableObject(IObjectWritable instance)
        {
            _writer.Write((byte)DataKind.Object_W);

            Type type = instance.GetType();

            this.WriteType(type);

            _binder?.Record(instance);

            instance.WriteTo(this);
        }
Exemplo n.º 3
0
        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);
        }