Example #1
0
        public override void CopyFrom(DxfHandledObject from, CloneContext cloneContext)
        {
            base.CopyFrom(from, cloneContext);
            DxfProxyEntity dxfProxyEntity = (DxfProxyEntity)from;

            this.dxfClass_0 = dxfProxyEntity.dxfClass_0 != null?Class906.smethod_9(cloneContext, dxfProxyEntity.dxfClass_0) : (DxfClass)null;

            this.proxyGraphics_0 = dxfProxyEntity.proxyGraphics_0 != null ? (ProxyGraphics)dxfProxyEntity.proxyGraphics_0.Clone(cloneContext) : (ProxyGraphics)null;
            this.dwgVersion_0    = dxfProxyEntity.dwgVersion_0;
            this.short_1         = dxfProxyEntity.short_1;
            this.bool_2          = dxfProxyEntity.bool_2;
            this.long_0          = dxfProxyEntity.long_0;
            if (dxfProxyEntity.stream_0 == null)
            {
                this.stream_0 = (Stream)null;
            }
            else
            {
                long position = dxfProxyEntity.stream_0.Position;
                dxfProxyEntity.stream_0.Position = 0L;
                this.stream_0 = (Stream) new PagedMemoryStream(dxfProxyEntity.stream_0, (long)(int)dxfProxyEntity.stream_0.Length);
                dxfProxyEntity.stream_0.Position = position;
            }
            this.uint_0 = dxfProxyEntity.uint_0;
            if (dxfProxyEntity.stream_1 == null)
            {
                this.stream_1 = (Stream)null;
            }
            else
            {
                long position = dxfProxyEntity.stream_1.Position;
                dxfProxyEntity.stream_1.Position = 0L;
                this.stream_1 = (Stream) new PagedMemoryStream(dxfProxyEntity.stream_1, (long)(int)dxfProxyEntity.stream_1.Length);
                dxfProxyEntity.stream_1.Position = position;
            }
            this.list_0.Clear();
            foreach (DxfTypedObjectReference typedObjectReference in dxfProxyEntity.list_0)
            {
                if (typedObjectReference.ObjectReference.Value == null)
                {
                    this.list_0.Add(new DxfTypedObjectReference(typedObjectReference.ReferenceType, DxfObjectReference.Null));
                }
                else
                {
                    this.list_0.Add(new DxfTypedObjectReference(typedObjectReference.ReferenceType, cloneContext.CloneReference((DxfHandledObject)typedObjectReference.ObjectReference.Value).Reference));
                }
            }
        }