public static bool IsAttributeDefined(MemberInfo member, Type attributeType, ReflectionOptions options) => TypeReflections.IsAttributeDefined(member, attributeType, options);
public static bool IsAttributeDefined(ParameterInfo parameter, Type attributeType, ReflectionOptions options) => TypeReflections.IsAttributeDefined(parameter, attributeType, options);
public static bool IsAttributeDefined <TAttribute>(MemberInfo member, ReflectionOptions options) where TAttribute : Attribute => TypeReflections.IsAttributeDefined <TAttribute>(member, options);
public static bool IsAttributeDefined <TAttribute>(ParameterInfo parameter, ReflectionOptions options) where TAttribute : Attribute => TypeReflections.IsAttributeDefined <TAttribute>(parameter, options);
public static string GetDescriptionOr(this MemberInfo member, string defaultVal, ReflectionOptions options = ReflectionOptions.Default) { return(TypeReflections.GetDescriptionOr(member, defaultVal, options)); }
public static bool IsObjectDerivedFrom <TSource, TParent>(TSource value, TypeIsOptions isOptions = TypeIsOptions.Default) => TypeReflections.IsObjectDerivedFrom <TSource, TParent>(value, isOptions);
public static bool IsImplementationOfGenericType <TSource, TGenericParent>(out Type[] genericArguments) => TypeReflections.IsImplementationOfGenericType <TSource, TGenericParent>(out genericArguments);
public static bool IsDescriptionDefined(this MemberInfo member, ReflectionOptions options = ReflectionOptions.Default) { return(TypeReflections.IsDescriptionDefined(member, options)); }
public static bool IsTypeBasedOn <TSource, TParent>() => TypeReflections.IsTypeBasedOn <TSource, TParent>();
public static bool IsImplementationOfGenericType(Type sourceType, Type parentGenericType, out Type[] genericArguments) => TypeReflections.IsImplementationOfGenericType(sourceType, parentGenericType, out genericArguments);
public static bool IsTypeBasedOn(Type sourceType, Type parentType) => TypeReflections.IsTypeBasedOn(sourceType, parentType);
public static bool IsTypeDerivedFrom <TSource, TParent>(TypeDerivedOptions derivedOptions = TypeDerivedOptions.Default) => TypeReflections.IsTypeDerivedFrom <TSource, TParent>(derivedOptions);
public static bool IsTypeDerivedFrom(Type sourceType, Type parentType, TypeDerivedOptions derivedOptions = TypeDerivedOptions.Default) => TypeReflections.IsTypeDerivedFrom(sourceType, parentType, derivedOptions);
/// <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 IsInterfaceDefined <TInterface>(Type type, InterfaceOptions options = InterfaceOptions.Default) => TypeReflections.IsInterfaceDefined <TInterface>(type, options);
/// <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)); }
public static bool IsDescriptionDefined(MemberInfo member, ReflectionOptions refOptions = ReflectionOptions.Default) => TypeReflections.IsDescriptionDefined(member, refOptions);
public static string GetDescription <T>(this T x, Expression <Func <T, object> > expression, ReflectionOptions options = ReflectionOptions.Default) { return(x is null ? string.Empty : TypeReflections.GetDescription(expression, options)); }
public static bool IsDescriptionDefined(ParameterInfo parameter, ReflectionOptions refOptions = ReflectionOptions.Default) => TypeReflections.IsDescriptionDefined(parameter, refOptions);
public static string GetDescriptionOr <T>(this T x, Expression <Func <T, object> > expression, string defaultVal, ReflectionOptions options = ReflectionOptions.Default) { return(x is null ? defaultVal : TypeReflections.GetDescriptionOr(expression, defaultVal, options)); }
public static bool IsObjectDerivedFrom <TSource>(TSource value, Type parentType, TypeIsOptions isOptions = TypeIsOptions.Default, TypeDerivedOptions derivedOptions = TypeDerivedOptions.Default) => TypeReflections.IsObjectDerivedFrom(value, parentType, isOptions, derivedOptions);