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

            typedClone.YetAnotherInt = YetAnotherInt;

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

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