示例#1
0
 private static T GetAttribute <T>(MemberAdapter info) where T : Attribute
 {
     if (info.IsProperty)
     {
         return(Leafing.Core.ClassHelper.GetAttribute <T>((PropertyInfo)info.GetMemberInfo(), false));
     }
     else
     {
         return(Leafing.Core.ClassHelper.GetAttribute <T>((FieldInfo)info.GetMemberInfo(), false));
     }
 }
示例#2
0
        private List <Attribute> GetAttributes()
        {
            var list  = new List <Attribute>();
            var array = MemberInfo.GetMemberInfo().GetCustomAttributes(false);

            foreach (Attribute o in array)
            {
                list.Add(o);
            }
            return(list);
        }