/// <summary> /// Finds a custom attribute /// </summary> /// <param name="attributeType">Custom attribute type</param> /// <param name="inherit">true to check custom attributes in all base classes</param> /// <returns></returns> public DmdCustomAttributeData FindCustomAttribute(Type attributeType, bool inherit) => CustomAttributesHelper.Find(GetCustomAttributesData(), DmdTypeUtilities.ToDmdType(attributeType, AppDomain));
/// <summary> /// Checks if a custom attribute is present /// </summary> /// <param name="attributeType">Custom attribute type</param> /// <param name="inherit">true to check custom attributes in all base classes</param> /// <returns></returns> public bool IsDefined(Type attributeType, bool inherit) => CustomAttributesHelper.IsDefined(GetCustomAttributesData(), DmdTypeUtilities.ToDmdType(attributeType, AppDomain));