|
@@ -22,24 +22,28 @@ namespace JBIM
|
|
{
|
|
{
|
|
ElementType = GetElementType();
|
|
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>
|
|
/// <summary>
|
|
/// 获取类型Type
|
|
/// 获取类型Type
|
|
/// </summary>
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
/// <returns></returns>
|
|
protected string GetElementType()
|
|
protected string GetElementType()
|
|
{
|
|
{
|
|
- var attributes= this.GetType().GetCustomAttributes(typeof(TypeDefinitonAttribute), true);
|
|
|
|
|
|
+ var attributes = this.GetType().GetCustomAttributes(typeof(TypeDefinitonAttribute), true);
|
|
string result = null;
|
|
string result = null;
|
|
if (attributes.Any())
|
|
if (attributes.Any())
|
|
{
|
|
{
|
|
- result=(attributes[0] as TypeDefinitonAttribute)?.GetTypeDefiniton();
|
|
|
|
|
|
+ result = (attributes[0] as TypeDefinitonAttribute)?.GetTypeDefiniton();
|
|
}
|
|
}
|
|
|
|
|
|
if (string.IsNullOrEmpty(result))
|
|
if (string.IsNullOrEmpty(result))
|
|
{
|
|
{
|
|
- result= TypeDefinitonUtil.GetTypeDefiniton(TypeDefinition.BimObject);
|
|
|
|
|
|
+ result = TypeDefinitonUtil.GetTypeDefiniton(TypeDefinition.BimObject);
|
|
}
|
|
}
|
|
return result;
|
|
return result;
|
|
}
|
|
}
|