public static bool HasAttribute <TAttribute>(this System.Reflection.PropertyInfo property) where TAttribute : Attribute { return(property.GetAttributeArray <TAttribute>().Count > 0); }
public static TAttribute GetAttribute <TAttribute>(this System.Reflection.PropertyInfo property) where TAttribute : Attribute { return(property.GetAttributeArray <TAttribute>().Single()); }