|
@@ -22,24 +22,28 @@ namespace JBIM
|
|
|
{
|
|
|
ElementType = GetElementType();
|
|
|
}
|
|
|
- public BimId Id { get;internal set; }
|
|
|
- public string ElementType { get;protected set; }
|
|
|
+ public BimId Id { get; internal set; }
|
|
|
+ public string ElementType { get; protected set; }
|
|
|
+ /// <summary>
|
|
|
+ /// 附加信息,预留
|
|
|
+ /// </summary>
|
|
|
+ public string Tag { get; set; }
|
|
|
/// <summary>
|
|
|
/// 获取类型Type
|
|
|
/// </summary>
|
|
|
/// <returns></returns>
|
|
|
protected string GetElementType()
|
|
|
{
|
|
|
- var attributes= this.GetType().GetCustomAttributes(typeof(TypeDefinitonAttribute), true);
|
|
|
+ var attributes = this.GetType().GetCustomAttributes(typeof(TypeDefinitonAttribute), true);
|
|
|
string result = null;
|
|
|
if (attributes.Any())
|
|
|
{
|
|
|
- result=(attributes[0] as TypeDefinitonAttribute)?.GetTypeDefiniton();
|
|
|
+ result = (attributes[0] as TypeDefinitonAttribute)?.GetTypeDefiniton();
|
|
|
}
|
|
|
|
|
|
if (string.IsNullOrEmpty(result))
|
|
|
{
|
|
|
- result= TypeDefinitonUtil.GetTypeDefiniton(TypeDefinition.BimObject);
|
|
|
+ result = TypeDefinitonUtil.GetTypeDefiniton(TypeDefinition.BimObject);
|
|
|
}
|
|
|
return result;
|
|
|
}
|