public static Attachment GetClone(this Attachment o, bool cloneMeshesAsLinked) { RegionAttachment regionAttachment = o as RegionAttachment; if (regionAttachment != null) { return(regionAttachment.GetClone()); } MeshAttachment meshAttachment = o as MeshAttachment; if (meshAttachment != null) { return((!cloneMeshesAsLinked) ? meshAttachment.GetClone() : meshAttachment.GetLinkedClone()); } BoundingBoxAttachment boundingBoxAttachment = o as BoundingBoxAttachment; if (boundingBoxAttachment != null) { return(boundingBoxAttachment.GetClone()); } PathAttachment pathAttachment = o as PathAttachment; if (pathAttachment != null) { return(pathAttachment.GetClone()); } PointAttachment pointAttachment = o as PointAttachment; if (pointAttachment != null) { return(pointAttachment.GetClone()); } return((o as ClippingAttachment)?.GetClone()); }
public static Attachment GetClone(this Attachment o, bool cloneMeshesAsLinked) { RegionAttachment attachment = o as RegionAttachment; if (attachment != null) { return(attachment.GetClone()); } MeshAttachment attachment2 = o as MeshAttachment; if (attachment2 != null) { return(!cloneMeshesAsLinked ? attachment2.GetClone() : attachment2.GetLinkedClone(true)); } BoundingBoxAttachment attachment3 = o as BoundingBoxAttachment; if (attachment3 != null) { return(attachment3.GetClone()); } PathAttachment attachment4 = o as PathAttachment; if (attachment4 != null) { return(attachment4.GetClone()); } PointAttachment attachment5 = o as PointAttachment; if (attachment5 != null) { return(attachment5.GetClone()); } ClippingAttachment attachment6 = o as ClippingAttachment; if (attachment6 != null) { return(attachment6.GetClone()); } return(null); }