static bool IsValid(IPropertyDescriptor p) { if (p == null) { return(false); } if (p.IsDefined <NoApi>()) { return(false); } // we dont want many to many realationship tables, it didnt work anyway, lets be explicit with NoApi //if (typeof(ICollection<>).IsAssignableFrom(p.Type)) return false; //if (typeof(ICollection).IsAssignableFrom(p.Type)) return false; return(true); }
public static bool IsDefined <T>(this IPropertyDescriptor me, bool inherit = true) where T : Attribute { return(me.IsDefined(typeof(T))); }
public bool IsDefined(Type attributeType, bool inherit = true) { return(holder.IsDefined(attributeType, inherit)); }