Example #1
0
        public override IGraphCloneable Clone(CloneContext cloneContext)
        {
            DxfIdBuffer dxfIdBuffer = (DxfIdBuffer)cloneContext.GetExistingClone((IGraphCloneable)this);

            if (dxfIdBuffer == null)
            {
                dxfIdBuffer = new DxfIdBuffer();
                cloneContext.RegisterClone((IGraphCloneable)this, (IGraphCloneable)dxfIdBuffer);
                dxfIdBuffer.CopyFrom((DxfHandledObject)this, cloneContext);
            }
            return((IGraphCloneable)dxfIdBuffer);
        }
Example #2
0
        public override void CopyFrom(DxfHandledObject from, CloneContext cloneContext)
        {
            base.CopyFrom(from, cloneContext);
            DxfIdBuffer dxfIdBuffer = (DxfIdBuffer)from;

            this.byte_0 = dxfIdBuffer.byte_0;
            this.dxfHandledObjectCollection_1.Clear();
            if (cloneContext.SourceModel == cloneContext.TargetModel)
            {
                this.dxfHandledObjectCollection_1 = dxfIdBuffer.dxfHandledObjectCollection_1;
            }
            else
            {
                foreach (DxfHandledObject dxfHandledObject in dxfIdBuffer.dxfHandledObjectCollection_1)
                {
                    this.dxfHandledObjectCollection_1.Add((DxfHandledObject)cloneContext.Clone((IGraphCloneable)dxfHandledObject));
                }
            }
        }