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)); } }
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); }