使用[key]注释访问t4文件属性,例如在ownedAttributes和navigableOwnedEnds
中答案 0 :(得分:2)
以下是我正在寻找的答案
foreach(IProperty attribute in this.Element.OwnedAttributes)
{
string attributeList = GetProperty(attribute, "property", "ClrAttributes");
if(!string.IsNullOrEmpty(attributeList))
{
//attributeList now will contain the attribute put in
//Streotypes>C# property>ClrAttributes
}
}