KGy SOFT

Reflector Class

KGy SOFT Core Libraries Help
Provides reflection routines on objects that are in most case faster than standard System.Reflection ways.
Inheritance Hierarchy

SystemObject
  KGySoft.ReflectionReflector

Namespace:  KGySoft.Reflection
Assembly:  KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 5.0.0-rc.1
Syntax

public static class Reflector
Methods

  NameDescription
Public methodStatic memberCreateInstance(ConstructorInfo, Object)
Creates a new instance by a ConstructorInfo specified in the ctor parameter.
Public methodStatic memberCreateInstance(Type, ReflectionWays)
Creates a new instance of the specified type.
Public methodStatic memberCreateInstance(Type, Object)
Creates a new instance of the specified type.
Public methodStatic memberCreateInstance(ConstructorInfo, ReflectionWays, Object)
Creates a new instance by a ConstructorInfo specified in the ctor parameter.
Public methodStatic memberCreateInstance(Type, ReflectionWays, Object)
Creates a new instance of the specified type.
Public methodStatic memberCreateInstance(Type, Type, ReflectionWays)
Creates a new instance of the specified type.
Public methodStatic memberCreateInstance(Type, Type, Object)
Creates a new instance of the specified type.
Public methodStatic memberCreateInstance(Type, Type, ReflectionWays, Object)
Creates a new instance of the specified type.
Public methodStatic memberGetField(Object, FieldInfo, ReflectionWays)
Gets a field represented by the specified FieldInfo.
Public methodStatic memberGetField(Object, String, ReflectionWays)
Gets the instance field of an object represented by the specified fieldName.
Public methodStatic memberGetField(Type, String, ReflectionWays)
Gets the static field of a Type represented by the specified fieldName.
Public methodStatic memberGetIndexedMember(Object, Object)
Gets the value of an indexable object. It can be either an array instance or an object with default members (indexed properties).
Public methodStatic memberGetIndexedMember(Object, ReflectionWays, Object)
Gets the value of an indexable object. It can be either an array instance or an object with default members (indexed properties).
Public methodStatic memberGetProperty(Object, PropertyInfo, Object)
Gets a property represented by the specified PropertyInfo.
Public methodStatic memberGetProperty(Object, String, Object)
Gets the instance property of an object represented by the specified propertyName.
Public methodStatic memberGetProperty(Type, String, ReflectionWays)
Gets the static property of a Type represented by the specified propertyName.
Public methodStatic memberGetProperty(Object, PropertyInfo, ReflectionWays, Object)
Gets a property represented by the specified PropertyInfo.
Public methodStatic memberGetProperty(Object, String, ReflectionWays, Object)
Gets the instance property of an object represented by the specified propertyName.
Public methodStatic memberInvokeMethod(Object, MethodInfo, Object)
Invokes a method represented by the specified MethodInfo.
Public methodStatic memberInvokeMethod(Object, String, Object)
Invokes an instance method of an object represented by the specified methodName.
Public methodStatic memberInvokeMethod(Type, String, Object)
Invokes a static method of a Type represented by the specified methodName.
Public methodStatic memberInvokeMethod(Object, MethodInfo, ReflectionWays, Object)
Invokes a method represented by the specified MethodInfo.
Public methodStatic memberInvokeMethod(Object, MethodInfo, Type, Object)
Invokes a method represented by the specified MethodInfo.
Public methodStatic memberInvokeMethod(Object, String, ReflectionWays, Object)
Invokes an instance method of an object represented by the specified methodName.
Public methodStatic memberInvokeMethod(Object, String, Type, Object)
Invokes an instance method of an object represented by the specified methodName.
Public methodStatic memberInvokeMethod(Type, String, ReflectionWays, Object)
Invokes a static method of a Type represented by the specified methodName.
Public methodStatic memberInvokeMethod(Type, String, Type, Object)
Invokes a static method of a Type represented by the specified methodName.
Public methodStatic memberInvokeMethod(Object, MethodInfo, Type, ReflectionWays, Object)
Invokes a method represented by the specified MethodInfo.
Public methodStatic memberInvokeMethod(Object, String, Type, ReflectionWays, Object)
Invokes an instance method of an object represented by the specified methodName.
Public methodStatic memberInvokeMethod(Type, String, Type, ReflectionWays, Object)
Invokes a static method of a Type represented by the specified methodName.
Public methodStatic memberIsExplicitInterfaceImplementation(MethodInfo)
Determines whether the specified method is an explicit interface implementation.
Public methodStatic memberIsExplicitInterfaceImplementation(PropertyInfo)
Determines whether the specified property is an explicit interface implementation.
Public methodStatic memberMemberOf(ExpressionAction)
Gets the action method of an expression by a refactoring-safe way.
Public methodStatic memberMemberOfT(ExpressionFuncT)
Gets the returned member of an expression providing a refactoring-safe way for referencing a field, property, constructor or function method.
Public methodStatic memberResolveAssembly(AssemblyName, ResolveAssemblyOptions)
Gets the Assembly with the specified assemblyName.
Public methodStatic memberResolveAssembly(String, ResolveAssemblyOptions)
Gets the Assembly with the specified assemblyName.
Public methodStatic memberResolveAssembly(String, Boolean, Boolean) Obsolete.
Gets the Assembly with the specified assemblyName.
Public methodStatic memberCode exampleResolveType(String, ResolveTypeOptions)
Gets the Type with the specified typeName. When no assembly is defined in typeName, the type can be defined in any loaded assembly.
Public methodStatic memberResolveType(Assembly, String, ResolveTypeOptions)
Gets the Type with the specified typeName from the specified assembly. As the type is about to be resolved from the specified assembly, assembly names are allowed to be specified in the generic arguments only.
See the Examples section of the ResolveType(String, ResolveTypeOptions) overload for some examples.
Public methodStatic memberResolveType(String, Boolean, Boolean) Obsolete.
Gets the Type with the specified typeName. When no assembly is defined in typeName, the type can be defined in any loaded assembly.
Public methodStatic memberResolveType(String, FuncAssemblyName, String, Type, ResolveTypeOptions)
Gets the Type with the specified typeName using the specified typeResolver.
See the Examples section of the ResolveType(String, ResolveTypeOptions) overload for some examples.
Public methodStatic memberSetField(Object, FieldInfo, Object, ReflectionWays)
Sets a field represented by the specified FieldInfo.
Public methodStatic memberSetField(Object, String, Object, ReflectionWays)
Sets the instance field of an object represented by the specified fieldName.
Public methodStatic memberSetField(Type, String, Object, ReflectionWays)
Sets the static field of a Type represented by the specified fieldName.
Public methodStatic memberSetIndexedMember(Object, Object, Object)
Sets the value of an indexable object. It can be either an array instance or an object with default members (indexed properties).
Public methodStatic memberSetIndexedMember(Object, Object, ReflectionWays, Object)
Sets the value of an indexable object. It can be either an array instance or an object with default members (indexed properties).
Public methodStatic memberSetProperty(Object, PropertyInfo, Object, Object)
Sets a property represented by the specified PropertyInfo.
Public methodStatic memberSetProperty(Object, String, Object, Object)
Sets the instance property of an object represented by the specified propertyName.
Public methodStatic memberSetProperty(Type, String, Object, ReflectionWays)
Sets the static property of a Type represented by the specified propertyName.
Public methodStatic memberSetProperty(Object, PropertyInfo, Object, ReflectionWays, Object)
Sets a property represented by the specified PropertyInfo.
Public methodStatic memberSetProperty(Object, String, Object, ReflectionWays, Object)
Sets the instance property of an object represented by the specified propertyName.
Public methodStatic memberTryCreateInstance(Type, Object)
Tries to create a new instance of the specified type.
Public methodStatic memberTryCreateInstance(Type, ReflectionWays, Object)
Tries to create a new instance of the specified type.
Public methodStatic memberTryCreateInstance(Type, Object, Object)
Tries to create a new instance of the specified type.
Public methodStatic memberTryCreateInstance(Type, Type, Object)
Tries to create a new instance of the specified type.
Public methodStatic memberTryCreateInstance(Type, ReflectionWays, Object, Object)
Tries to create a new instance of the specified type.
Public methodStatic memberTryCreateInstance(Type, Type, ReflectionWays, Object)
Tries to create a new instance of the specified type.
Public methodStatic memberTryCreateInstance(Type, Type, Object, Object)
Tries to create a new instance of the specified type.
Public methodStatic memberTryCreateInstance(Type, Type, ReflectionWays, Object, Object)
Tries to create a new instance of the specified type.
Public methodStatic memberTryGetField(Object, String, Object, ReflectionWays)
Tries to get the instance field of an object represented by the specified fieldName.
Public methodStatic memberTryGetField(Type, String, Object, ReflectionWays)
Tries to get the static field of a Type represented by the specified fieldName.
Public methodStatic memberTryGetIndexedMember(Object, Object, Object)
Tries to get the value of an indexable object. It can be either an array or an object with default members (indexed properties).
Public methodStatic memberTryGetIndexedMember(Object, ReflectionWays, Object, Object)
Tries to get the value of an indexable object. It can be either an array or an object with default members (indexed properties).
Public methodStatic memberTryGetProperty(Object, String, Object, Object)
Tries to get the instance property of an object represented by the specified propertyName.
Public methodStatic memberTryGetProperty(Type, String, Object, ReflectionWays)
Tries to get the static property of a Type represented by the specified propertyName.
Public methodStatic memberTryGetProperty(Object, String, ReflectionWays, Object, Object)
Tries to get the instance property of an object represented by the specified propertyName.
Public methodStatic memberTryInvokeMethod(Object, String, Object, Object)
Tries to invoke an instance method of an object represented by the specified methodName.
Public methodStatic memberTryInvokeMethod(Type, String, Object, Object)
Tries to invoke a static method of a Type represented by the specified methodName.
Public methodStatic memberTryInvokeMethod(Object, String, ReflectionWays, Object, Object)
Tries to invoke an instance method of an object represented by the specified methodName.
Public methodStatic memberTryInvokeMethod(Object, String, Type, Object, Object)
Tries to invoke an instance method of an object represented by the specified methodName.
Public methodStatic memberTryInvokeMethod(Type, String, ReflectionWays, Object, Object)
Tries to invoke a static method of a Type represented by the specified methodName.
Public methodStatic memberTryInvokeMethod(Type, String, Type, Object, Object)
Tries to invoke a static method of a Type represented by the specified methodName.
Public methodStatic memberTryInvokeMethod(Object, String, Type, ReflectionWays, Object, Object)
Tries to invoke an instance method of an object represented by the specified methodName.
Public methodStatic memberTryInvokeMethod(Type, String, Type, ReflectionWays, Object, Object)
Tries to invoke a static method of a Type represented by the specified methodName.
Public methodStatic memberTrySetField(Object, String, Object, ReflectionWays)
Tries to set the instance field of an object represented by the specified fieldName.
Public methodStatic memberTrySetField(Type, String, Object, ReflectionWays)
Tries to set the static field of a Type represented by the specified fieldName.
Public methodStatic memberTrySetIndexedMember(Object, Object, Object)
Tries to set the value of an indexable object. It can be either an array or an object with default members (indexed properties).
Public methodStatic memberTrySetIndexedMember(Object, Object, ReflectionWays, Object)
Tries to set the value of an indexable object. It can be either an array or an object with default members (indexed properties).
Public methodStatic memberTrySetProperty(Object, String, Object, Object)
Tries to set the instance property of an object represented by the specified propertyName.
Public methodStatic memberTrySetProperty(Type, String, Object, ReflectionWays)
Tries to set the static property of a Type represented by the specified propertyName.
Public methodStatic memberTrySetProperty(Object, String, Object, ReflectionWays, Object)
Tries to set the instance property of an object represented by the specified propertyName.
Top
See Also

Reference