Example #1
0
 public static bool IsAttributeDefined(MemberInfo member, Type attributeType, ReflectionOptions options) =>
 TypeReflections.IsAttributeDefined(member, attributeType, options);
Example #2
0
 public static bool IsAttributeDefined(ParameterInfo parameter, Type attributeType, ReflectionOptions options) =>
 TypeReflections.IsAttributeDefined(parameter, attributeType, options);
Example #3
0
 public static bool IsAttributeDefined <TAttribute>(MemberInfo member, ReflectionOptions options) where TAttribute : Attribute =>
 TypeReflections.IsAttributeDefined <TAttribute>(member, options);
Example #4
0
 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));
 }
Example #6
0
 public static bool IsObjectDerivedFrom <TSource, TParent>(TSource value, TypeIsOptions isOptions = TypeIsOptions.Default) =>
 TypeReflections.IsObjectDerivedFrom <TSource, TParent>(value, isOptions);
Example #7
0
 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));
 }
Example #9
0
 public static bool IsTypeBasedOn <TSource, TParent>() => TypeReflections.IsTypeBasedOn <TSource, TParent>();
Example #10
0
 public static bool IsImplementationOfGenericType(Type sourceType, Type parentGenericType, out Type[] genericArguments) =>
 TypeReflections.IsImplementationOfGenericType(sourceType, parentGenericType, out genericArguments);
Example #11
0
 public static bool IsTypeBasedOn(Type sourceType, Type parentType) => TypeReflections.IsTypeBasedOn(sourceType, parentType);
Example #12
0
 public static bool IsTypeDerivedFrom <TSource, TParent>(TypeDerivedOptions derivedOptions = TypeDerivedOptions.Default) =>
 TypeReflections.IsTypeDerivedFrom <TSource, TParent>(derivedOptions);
Example #13
0
 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));
 }
Example #15
0
 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));
 }
Example #17
0
 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));
 }
Example #19
0
 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));
 }
Example #21
0
 public static bool IsObjectDerivedFrom <TSource>(TSource value, Type parentType, TypeIsOptions isOptions = TypeIsOptions.Default, TypeDerivedOptions derivedOptions = TypeDerivedOptions.Default) =>
 TypeReflections.IsObjectDerivedFrom(value, parentType, isOptions, derivedOptions);