private void Init(CodeElement2 ele) { Init(); ParentElement = ele; var attrs = ele.GetCustomAttribute(this.GetType()).GetCodeAttributeArguments(); CopyPropertyFromAttributeArguments(attrs); }
public static bool HasAttribute(this CodeElement2 ct, Type attrType) { return(ct.GetCustomAttribute(attrType) != null); }
static public TResult GetAttributeProperty <TAttr, TResult>(this CodeElement2 ce, Expression <Func <TAttr, TResult> > memberExpr) where TAttr : Attribute { return(ce.GetCustomAttribute(typeof(TAttr)).GetProperty(memberExpr)); }
private void Init(CodeElement2 ele) { Init(); ParentElement = ele; var attrs = ele.GetCustomAttribute(GetType()).GetCodeAttributeArguments(); CopyPropertyFromAttributeArguments(attrs); }