Ejemplo n.º 1
0
        private void Init(CodeElement2 ele)
        {
            Init();
            ParentElement = ele;
            var attrs = ele.GetCustomAttribute(this.GetType()).GetCodeAttributeArguments();

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