Exemplo n.º 1
0
        internal override BaseReference TransferTo(BaseReference reference)
        {
            IStorable     storable      = reference.InternalValue();
            BaseReference baseReference = AllocateAndPin(storable, ItemSizes.SizeOf(storable));

            (storable as ITransferable)?.TransferTo(this);
            baseReference.UnPinValue();
            reference.ScalabilityCache.Free(reference);
            return(baseReference);
        }
        public override BaseReference TransferTo(BaseReference reference)
        {
            IStorable     storable      = reference.InternalValue();
            BaseReference baseReference = base.AllocateAndPin(storable, ItemSizes.SizeOf(storable));
            ITransferable transferable  = storable as ITransferable;

            if (transferable != null)
            {
                transferable.TransferTo(this);
            }
            baseReference.UnPinValue();
            reference.ScalabilityCache.Free(reference);
            return(baseReference);
        }