From 485953dd629974c3a473b85348b58e312ede6bea Mon Sep 17 00:00:00 2001 From: DYH <1742647821@qq.com> Date: Thu, 16 Mar 2023 20:57:22 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dprojitems=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E9=94=99=E8=AF=AF=E5=AF=BC=E8=87=B4=E6=89=BE=E4=B8=8D?= =?UTF-8?q?=E5=88=B0.cs=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/CAD/IFox.CAD.Shared/IFox.CAD.Shared.projitems | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/CAD/IFox.CAD.Shared/IFox.CAD.Shared.projitems b/src/CAD/IFox.CAD.Shared/IFox.CAD.Shared.projitems index f76f248..87d4520 100644 --- a/src/CAD/IFox.CAD.Shared/IFox.CAD.Shared.projitems +++ b/src/CAD/IFox.CAD.Shared/IFox.CAD.Shared.projitems @@ -51,6 +51,7 @@ + @@ -81,7 +82,6 @@ - @@ -89,7 +89,7 @@ - + -- Gitee From bb931a0545297cbe9caa1b294a768d0ae0c353e2 Mon Sep 17 00:00:00 2001 From: DYH <1742647821@qq.com> Date: Thu, 16 Mar 2023 21:05:33 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E6=9C=AC=E8=BA=AB=E7=B1=BB=E5=9E=8B=E7=9A=84=E5=85=8B=E9=9A=86?= =?UTF-8?q?=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../IFox.CAD.Shared/ExtensionMethod/DBObjectEx.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/CAD/IFox.CAD.Shared/ExtensionMethod/DBObjectEx.cs b/src/CAD/IFox.CAD.Shared/ExtensionMethod/DBObjectEx.cs index 9733d94..711c270 100644 --- a/src/CAD/IFox.CAD.Shared/ExtensionMethod/DBObjectEx.cs +++ b/src/CAD/IFox.CAD.Shared/ExtensionMethod/DBObjectEx.cs @@ -50,7 +50,17 @@ public static void RemoveXData(this DBObject obj, string appName) obj.XData = rb; } } - + /// + /// 克隆对象 + /// + /// 对象类型 + /// 对象 + /// 克隆后的对象 + /// + public static T CloneEx(this T ent) where T : RXObject + { + return ent.Clone() is T tEnt ? tEnt : throw new ArgumentException(nameof(CloneEx) + "克隆出错"); + } /// /// 修改扩展数据 /// -- Gitee