Example #1
0
        protected override ILazinator AssignCloneProperties(ILazinator clone, IncludeChildrenMode includeChildrenMode)
        {
            base.AssignCloneProperties(clone, includeChildrenMode);
            ClosedGenericWithGeneric typedClone = (ClosedGenericWithGeneric)clone;

            typedClone.AnotherPropertyAddedHereToo = AnotherPropertyAddedHereToo;

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

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