Class ReflectionHelper
Inheritance
ReflectionHelper
Assembly: Volo.Abp.Core.dll
Syntax
public static class ReflectionHelper
Methods
GetAttributesOfMemberOrDeclaringType<TAttribute>(MemberInfo, bool)
Declaration
public static IEnumerable<TAttribute> GetAttributesOfMemberOrDeclaringType<TAttribute>(MemberInfo memberInfo, bool inherit = true) where TAttribute : class
Parameters
Returns
Type Parameters
| Name |
Description |
| TAttribute |
|
GetImplementedGenericTypes(Type, Type)
Declaration
public static List<Type> GetImplementedGenericTypes(Type givenType, Type genericType)
Parameters
| Type |
Name |
Description |
| Type |
givenType |
|
| Type |
genericType |
|
Returns
GetPublicConstantsRecursively(Type)
Declaration
public static string[] GetPublicConstantsRecursively(Type type)
Parameters
| Type |
Name |
Description |
| Type |
type |
|
Returns
GetSingleAttributeOfMemberOrDeclaringTypeOrDefault<TAttribute>(MemberInfo, TAttribute?, bool)
Declaration
public static TAttribute? GetSingleAttributeOfMemberOrDeclaringTypeOrDefault<TAttribute>(MemberInfo memberInfo, TAttribute? defaultValue = null, bool inherit = true) where TAttribute : class
Parameters
| Type |
Name |
Description |
| MemberInfo |
memberInfo |
|
| TAttribute |
defaultValue |
|
| bool |
inherit |
|
Returns
| Type |
Description |
| TAttribute |
|
Type Parameters
| Name |
Description |
| TAttribute |
|
GetSingleAttributeOrDefault<TAttribute>(MemberInfo, TAttribute?, bool)
Declaration
public static TAttribute? GetSingleAttributeOrDefault<TAttribute>(MemberInfo memberInfo, TAttribute? defaultValue = null, bool inherit = true) where TAttribute : Attribute
Parameters
| Type |
Name |
Description |
| MemberInfo |
memberInfo |
|
| TAttribute |
defaultValue |
|
| bool |
inherit |
|
Returns
| Type |
Description |
| TAttribute |
|
Type Parameters
| Name |
Description |
| TAttribute |
|
GetValueByPath(object, Type, string)
Declaration
public static object? GetValueByPath(object obj, Type objectType, string propertyPath)
Parameters
Returns
IsAssignableToGenericType(Type, Type)
Declaration
public static bool IsAssignableToGenericType(Type givenType, Type genericType)
Parameters
| Type |
Name |
Description |
| Type |
givenType |
|
| Type |
genericType |
|
Returns