1
This commit is contained in:
@@ -40,7 +40,7 @@ namespace BITKit
|
||||
/// <summary>
|
||||
/// 基础物品
|
||||
/// </summary>
|
||||
public interface IBasicItem :IPropertable
|
||||
public interface IBasicItem :IPropertable,ICloneable,IAddressable
|
||||
{
|
||||
/// <summary>
|
||||
/// 唯一Id
|
||||
@@ -50,10 +50,10 @@ namespace BITKit
|
||||
/// 物品名,一般用于查找物品的主键
|
||||
/// </summary>
|
||||
string Name { get; }
|
||||
/// <summary>
|
||||
/// 可寻址路径,该路径用于查找物品
|
||||
/// </summary>
|
||||
string AddressablePath { get; }
|
||||
// /// <summary>
|
||||
// /// 可寻址路径,该路径用于查找物品
|
||||
// /// </summary>
|
||||
// string AddressablePath { get; }
|
||||
/// <summary>
|
||||
/// 物品描述
|
||||
/// </summary>
|
||||
@@ -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