Exemple #1
0
        public virtual void CopyFrom(DxfHandledObject from, CloneContext cloneContext)
        {
            this.ExtensionDictionary         = from.ExtensionDictionary != null ? (DxfDictionary)from.ExtensionDictionary.Clone(cloneContext) : (DxfDictionary)null;
            this.dxfExtendedDataCollection_0 = from.dxfExtendedDataCollection_0 != null?from.dxfExtendedDataCollection_0.Clone(cloneContext) : (DxfExtendedDataCollection)null;

            if (!cloneContext.CloneExact)
            {
                return;
            }
            this.dxfObjectReference_0.Handle = from.Reference.Handle;
        }
Exemple #2
0
        public DxfExtendedDataCollection Clone(CloneContext cloneContext)
        {
            switch (cloneContext.ReferenceResolutionType)
            {
            case ReferenceResolutionType.IgnoreMissing:
                return((DxfExtendedDataCollection)null);

            case ReferenceResolutionType.CloneMissing:
                DxfExtendedDataCollection extendedDataCollection = new DxfExtendedDataCollection();
                foreach (DxfExtendedData dxfExtendedData in (IEnumerable <DxfExtendedData>) this.Items)
                {
                    extendedDataCollection.Add(dxfExtendedData.Clone(cloneContext));
                }
                return(extendedDataCollection);

            case ReferenceResolutionType.FailOnMissing:
                throw new DxfException(string.Format("Could not create necessary extended data for cloning."));

            default:
                return((DxfExtendedDataCollection)null);
            }
        }
Exemple #3
0
 internal void method_1(DxfExtendedDataCollection extendedDataCollection)
 {
     this.dxfExtendedDataCollection_0 = extendedDataCollection;
 }