Show / Hide Table of Contents

Class ReflectionHelper

Inheritance
object
ReflectionHelper
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Volo.Abp.Reflection
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
Type Name Description
MemberInfo memberInfo
bool inherit
Returns
Type Description
IEnumerable<TAttribute>
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
Type Description
List<Type>

GetPublicConstantsRecursively(Type)

Declaration
public static string[] GetPublicConstantsRecursively(Type type)
Parameters
Type Name Description
Type type
Returns
Type Description
string[]

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
Type Name Description
object obj
Type objectType
string propertyPath
Returns
Type Description
object

IsAssignableToGenericType(Type, Type)

Declaration
public static bool IsAssignableToGenericType(Type givenType, Type genericType)
Parameters
Type Name Description
Type givenType
Type genericType
Returns
Type Description
bool
In this article
Back to top Powered by Volosoft