1
This commit is contained in:
@@ -40,7 +40,7 @@ namespace BITKit
|
||||
/// <summary>
|
||||
/// 基础物品
|
||||
/// </summary>
|
||||
public interface IBasicItem :IPropertable
|
||||
public interface IBasicItem :IPropertable,ICloneable
|
||||
{
|
||||
/// <summary>
|
||||
/// 唯一Id
|
||||
@@ -76,7 +76,7 @@ namespace BITKit
|
||||
/// 被托管的物品
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public record ManagedItem : IBasicItem
|
||||
public class ManagedItem : IBasicItem
|
||||
{
|
||||
#region 字段
|
||||
public int Id;
|
||||
@@ -135,8 +135,14 @@ namespace BITKit
|
||||
{
|
||||
return property.CopyPropertiesFrom(propertable);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public object Clone()
|
||||
{
|
||||
var item = MemberwiseClone() as ManagedItem;
|
||||
item!.Id = Id;
|
||||
return item;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
Reference in New Issue
Block a user