Exemplo n.º 1
0
        private static void Merge(MarshallingContext context, int masterAddress, MarshallingBuffer
                                  writeBuffer, MarshallingBuffer parentBuffer, MarshallingBuffer childBuffer, int
                                  linkOffset)
        {
            int childPosition = writeBuffer.Offset();

            writeBuffer.Reserve(childBuffer.BlockedLength());
            MergeChildren(context, masterAddress, writeBuffer, childBuffer, linkOffset);
            int savedWriteBufferOffset = writeBuffer.Offset();

            writeBuffer.Seek(childPosition);
            childBuffer.TransferContentTo(writeBuffer._delegate);
            writeBuffer.Seek(savedWriteBufferOffset);
            parentBuffer.WriteLink(childBuffer, childPosition + linkOffset, childBuffer.UnblockedLength
                                       ());
            childBuffer.WriteIndex(context, masterAddress, childPosition + linkOffset);
        }
Exemplo n.º 2
0
		private static void Merge(MarshallingContext context, int masterAddress, MarshallingBuffer
			 writeBuffer, MarshallingBuffer parentBuffer, MarshallingBuffer childBuffer, int
			 linkOffset)
		{
			int childPosition = writeBuffer.Offset();
			writeBuffer.Reserve(childBuffer.BlockedLength());
			MergeChildren(context, masterAddress, writeBuffer, childBuffer, linkOffset);
			int savedWriteBufferOffset = writeBuffer.Offset();
			writeBuffer.Seek(childPosition);
			childBuffer.TransferContentTo(writeBuffer._delegate);
			writeBuffer.Seek(savedWriteBufferOffset);
			parentBuffer.WriteLink(childBuffer, childPosition + linkOffset, childBuffer.UnblockedLength
				());
			childBuffer.WriteIndex(context, masterAddress, childPosition + linkOffset);
		}