Ejemplo n.º 1
0
        public object Clone()
        {
            var r = new HeaderData
            {
                _count                    = _count,
                _isDirty                  = _isDirty,
                DataBlockSize             = DataBlockSize,
                DiskBuffer                = (Sop.DataBlock)DiskBuffer.Clone(),
                EndAllocatableAddress     = EndAllocatableAddress,
                HintSizeOnDisk            = HintSizeOnDisk,
                IsModifiedInTransaction   = IsModifiedInTransaction,
                NextAllocatableAddress    = NextAllocatableAddress,
                OccupiedBlocksHead        = (Sop.DataBlock)OccupiedBlocksHead.Clone(),
                OccupiedBlocksTail        = (Sop.DataBlock)OccupiedBlocksTail.Clone(),
                OnDiskLeftoverSegmentSize = OnDiskLeftoverSegmentSize,
                StartAllocatableAddress   = StartAllocatableAddress
            };

            if (RecycledSegment != null)
            {
                r.RecycledSegment = (DeletedBlockInfo)RecycledSegment.Clone();
            }
            if (RecycledSegmentBeforeTransaction != null)
            {
                r.RecycledSegmentBeforeTransaction = (DeletedBlockInfo)RecycledSegmentBeforeTransaction.Clone();
            }
            return(r);
        }
Ejemplo n.º 2
0
        public object Clone()
        {
            DeletedBlockInfo r = new DeletedBlockInfo();

            r.Count             = Count;
            r.StartBlockAddress = StartBlockAddress;
            r.IsDirty           = IsDirty;
            r.HintSizeOnDisk    = HintSizeOnDisk;
            r.EndBlockAddress   = EndBlockAddress;
            if (DiskBuffer != null)
            {
                r.DiskBuffer = (Sop.DataBlock)DiskBuffer.Clone();
            }
            return(r);
        }