Class ReflectionUtility
- Namespace
- Zorro.Core
- Assembly
- Zorro.Core.Runtime.dll
public static class ReflectionUtility
- Inheritance
-
ReflectionUtility
- Inherited Members
-
Fields
FULL_BINDING
public const BindingFlags FULL_BINDING = Instance | Static | Public | NonPublic
Field Value
- BindingFlags
Methods
FindProperty(Type, string, bool)
public static PropertyInfo FindProperty(this Type type, string propertyName, bool throwNotFound = true)
Parameters
type
Type
propertyName
string
throwNotFound
bool
Returns
- PropertyInfo
GetClassesThatDeriveFrom(Type)
public static Type[] GetClassesThatDeriveFrom(Type baseType)
Parameters
baseType
Type
Returns
- Type[]
GetClassesWithAttribute<T>()
public static (Type, T)[] GetClassesWithAttribute<T>() where T : Attribute
Returns
- (Type, T)[]
Type Parameters
T
GetClassesWithAttribute<T>(IEnumerable<Type>)
public static (Type, T)[] GetClassesWithAttribute<T>(IEnumerable<Type> types) where T : Attribute
Parameters
types
IEnumerable<Type>
Returns
- (Type, T)[]
Type Parameters
T
GetFieldsWithAttribute<T>(Type)
public static FieldInfo[] GetFieldsWithAttribute<T>(Type type) where T : Attribute
Parameters
type
Type
Returns
- FieldInfo[]
Type Parameters
T
GetMethodsWithAttribute<T>()
public static (MethodInfo, Attribute)[] GetMethodsWithAttribute<T>() where T : Attribute
Returns
- (MethodInfo, Attribute)[]
Type Parameters
T
SetInternalProperty(object, string, object)
public static void SetInternalProperty(this object obj, string propertyName, object value)
Parameters
obj
object
propertyName
string
value
object