/// <summary> /// To determine whether the given Attribute is undefined.<br /> /// 判断给定的特性是否未定义。 /// </summary> /// <param name="member"></param> /// <param name="attributeType"></param> /// <param name="options"></param> /// <returns></returns> public static bool IsAttributeNotDefined(this MemberInfo member, Type attributeType, ReflectionOptions options = ReflectionOptions.Default) { return(!TypeReflections.IsAttributeDefined(member, attributeType, options)); }
/// <summary> /// To determine whether the given Attribute is undefined.<br /> /// 判断给定的特性是否未定义。 /// </summary> /// <typeparam name="TAttribute">要检查的特性类型</typeparam> /// <param name="member">要检查的类型成员</param> /// <param name="options">反射选项</param> /// <returns>是否不存在</returns> public static bool IsAttributeNotDefined <TAttribute>(this MemberInfo member, ReflectionOptions options = ReflectionOptions.Default) where TAttribute : Attribute { return(!TypeReflections.IsAttributeDefined <TAttribute>(member, options)); }
public static bool IsAttributeDefined(ParameterInfo parameter, Type attributeType, ReflectionOptions options) => TypeReflections.IsAttributeDefined(parameter, attributeType, options);
public static bool IsAttributeDefined(MemberInfo member, Type attributeType, ReflectionOptions options) => TypeReflections.IsAttributeDefined(member, attributeType, options);
public static bool IsAttributeDefined <TAttribute>(ParameterInfo parameter, ReflectionOptions options) where TAttribute : Attribute => TypeReflections.IsAttributeDefined <TAttribute>(parameter, options);
public static bool IsAttributeDefined <TAttribute>(MemberInfo member, ReflectionOptions options) where TAttribute : Attribute => TypeReflections.IsAttributeDefined <TAttribute>(member, options);