This commit is contained in:
CortexCore
2024-03-31 23:31:00 +08:00
parent e179d2eb53
commit b7b89ee71a
641 changed files with 31286 additions and 22134 deletions

View File

@@ -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
}