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
System.Reflection.MemberInfo memberInfo
bool inherit
Returns
Type Description
System.Collections.Generic.IEnumerable<T><TAttribute>
Type Parameters
Name Description
TAttribute

GetImplementedGenericTypes(Type, Type)

Declaration
public static List<Type> GetImplementedGenericTypes(Type givenType, Type genericType)
Parameters
Type Name Description
System.Type givenType
System.Type genericType
Returns
Type Description
System.Collections.Generic.List<T><System.Type>

GetPublicConstantsRecursively(Type)

Declaration
public static string[] GetPublicConstantsRecursively(Type type)
Parameters
Type Name Description
System.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
System.Reflection.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
System.Reflection.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
System.Type objectType
string propertyPath
Returns
Type Description
object

IsAssignableToGenericType(Type, Type)

Declaration
public static bool IsAssignableToGenericType(Type givenType, Type genericType)
Parameters
Type Name Description
System.Type givenType
System.Type genericType
Returns
Type Description
bool
In This Article
Back to top Powered by Volosoft