Beispiel #1
0
 /// <summary>
 /// Determines whether the <paramref name="provider"/> element has an associated <see cref="System.Attribute"/>
 /// of type <typeparamref name="T"/>.
 /// </summary>
 /// <returns>True if the source element has the associated attribute, false otherwise.</returns>
 public static bool HasAttribute <T>(this ICustomAttributeProvider provider) where T : Attribute
 {
     return(ReflectLookup.HasAttribute <T>(provider));
 }
Beispiel #2
0
 /// <summary>
 /// Determines whether the <paramref name="provider"/> element has an associated <see cref="System.Attribute"/>
 /// of type <paramref name="attributeType"/>.
 /// </summary>
 /// <returns>True if the source element has the associated attribute, false otherwise.</returns>
 public static bool HasAttribute(this ICustomAttributeProvider provider, Type attributeType)
 {
     return(ReflectLookup.HasAttribute(provider, attributeType));
 }