示例#1
0
        protected override ILazinator AssignCloneProperties(ILazinator clone, IncludeChildrenMode includeChildrenMode)
        {
            base.AssignCloneProperties(clone, includeChildrenMode);
            ClosedGeneric typedClone = (ClosedGeneric)clone;

            typedClone.AnotherPropertyAdded = AnotherPropertyAdded;

            return(typedClone);
        }
示例#2
0
        public override ILazinator CloneLazinator(IncludeChildrenMode includeChildrenMode = IncludeChildrenMode.IncludeAllChildren, CloneBufferOptions cloneBufferOptions = CloneBufferOptions.IndependentBuffers)
        {
            ClosedGeneric clone;

            if (cloneBufferOptions == CloneBufferOptions.NoBuffer)
            {
                clone = new ClosedGeneric(includeChildrenMode);
                clone.LazinatorObjectVersion = LazinatorObjectVersion;
                clone = (ClosedGeneric)AssignCloneProperties(clone, includeChildrenMode);
            }
            else
            {
                LazinatorMemory bytes = EncodeOrRecycleToNewBuffer(includeChildrenMode, OriginalIncludeChildrenMode, IsDirty, DescendantIsDirty, false, LazinatorMemoryStorage, this);
                clone = new ClosedGeneric(bytes);
            }
            return(clone);
        }