Namespace: Consultingwerk.Util
Class 
ReflectionHelper Copy to Clipboard
Parent classes:
Inherits: Progress.Lang.Object

File:ReflectionHelper
Purpose:Provides simplified APIs for dynamic access to .NET
Objects using reflection
Syntax:Static methods only, Protected constructor to disallow
instance creation
Author(s):Mike Fechner / Consultingwerk Ltd.
Created:Wed Sep 15 17:24:09 CEST 2010
Notes:See MSDN for details
This file is intended for GUI for .NET only
For support on ABL Reflection (OpenEdge 11.6 +), use the
Consultingwerk.Util.AblReflectionHelper



Top Method Summary
Options Name Purpose
+ Consultingwerk.Framework.Collections.CharacterList BaseClassList (character) Returns a CharacterList of the base classes of a given ABL class
+ CopyInstanceProperties (Object, Object, character) Assigns the values of all get- and set-able properties from one object to another
+ System.Object CreateInstance (character) Dynamically creates an instance of a .NET class using reflection
+ System.Attribute GetPropertyAttribute (Type, character, Type) Returns the attribute of the given type from a Component class
+ System.Object GetPropertyValue (Object, character) Dynamically Get a property value from a .NET object
+ LOGICAL HasProperty (Object, character) Determines if the .NET object has a property with the given name
+ System.Object InvokeGenericMethod (Object, character, character) Invokes a public and non static .NET generic method
# System.Object InvokeGenericMethod (Object, character, character, integer, Object, character, Object, character, Object, character, Object, character, Object, character, Object, character, Object, character, Object, character, Object, character, Object, character) Invokes a public and non static .NET generic method
+ System.Object InvokeGenericMethod (Object, character, character, Object, character) Invokes a public and non static .NET generic method
+ System.Object InvokeGenericMethod (Object, character, character, Object, character, Object, character) Invokes a public and non static .NET generic method
+ System.Object InvokeGenericMethod (Object, character, character, Object, character, Object, character, Object, character) Invokes a public and non static .NET generic method
+ System.Object InvokeGenericMethod (Object, character, character, Object, character, Object, character, Object, character, Object, character) Invokes a public and non static .NET generic method
+ System.Object InvokeGenericMethod (Object, character, character, Object, character, Object, character, Object, character, Object, character, Object, character) Invokes a public and non static .NET generic method
+ System.Object InvokeGenericMethod (Object, character, character, Object, character, Object, character, Object, character, Object, character, Object, character, Object, character) Invokes a public and non static .NET generic method
+ System.Object InvokeGenericMethod (Object, character, character, Object, character, Object, character, Object, character, Object, character, Object, character, Object, character, Object, character) Invokes a public and non static .NET generic method
+ System.Object InvokeGenericMethod (Object, character, character, Object, character, Object, character, Object, character, Object, character, Object, character, Object, character, Object, character, Object, character) Invokes a public and non static .NET generic method
+ System.Object InvokeGenericMethod (Object, character, character, Object, character, Object, character, Object, character, Object, character, Object, character, Object, character, Object, character, Object, character, Object, character) Invokes a public and non static .NET generic method
+ System.Object InvokeGenericMethod (Object, character, character, Object, character, Object, character, Object, character, Object, character, Object, character, Object, character, Object, character, Object, character, Object, character, Object, character) Invokes a public and non static .NET generic method
+ SetPropertyValue (Object, character, Object) Dynamically Set a property value from a .NET object

Top Constructor Summary
Options Name Purpose
# ReflectionHelper () Constructor for the ReflectionHelper class


Method Detail
Top

PUBLIC Consultingwerk.Framework.Collections.CharacterList BaseClassList (character)

Purpose: Returns a CharacterList of the base classes of a given ABL class
Notes:

Parameters:
pcClassName CHARACTER
The name of the class to return the list of base classes
Returns Consultingwerk.Framework.Collections.CharacterList
The CharacterList with the base classes
Top

PUBLIC CopyInstanceProperties (Object, Object, character)

Purpose: Assigns the values of all get- and set-able properties from one object
to another
Notes: Uses .NET Reflection, so only applicible to .NET visible properties
(properties of .NET objects or ABL object properties that are required
for implementing a .NET Interface)

Parameters:
poSourceObject System.Object
The source object to copy the properties from
poTargetObject System.Object
The target object to copy the properties to
pcExceptList CHARACTER
A comma delimited list of property names that will be skipped
Top

PUBLIC System.Object CreateInstance (character)

Purpose: Dynamically creates an instance of a .NET class using reflection
Notes: http://msdn.microsoft.com/en-us/library/6ycw1y17(v=VS.90).aspx

Parameters:
pcType CHARACTER
The type name to create an instance of
Returns System.Object
The reference to the new object instance
Top

PUBLIC System.Attribute GetPropertyAttribute (Type, character, Type)

Purpose: Returns the attribute of the given type from a Component class
Notes: The component is queries using the TypeDescriptor

Parameters:
poType System.Type
The type of the component
pcPropertyName CHARACTER
The name of the property
poAttributeType System.Type
The type of the attribute to return
Returns System.Attribute
The attribute
Top

PUBLIC System.Object GetPropertyValue (Object, character)

Purpose: Dynamically Get a property value from a .NET object
Notes: Uses reflection

Parameters:
poObject System.Object
The object to return a property value from
pcPropertyName CHARACTER
The name of the property to return the value from
Returns System.Object
The property value
Top

PUBLIC LOGICAL HasProperty (Object, character)

Purpose: Determines if the .NET object has a property with the given name
Notes:

Parameters:
poObject System.Object
The object to test
pcPropertyName CHARACTER
The name of the property to test
Returns LOGICAL
True when the property exists
Top

PUBLIC System.Object InvokeGenericMethod (Object, character, character)

Purpose: Invokes a public and non static .NET generic method
Notes: Currently only supports a single <T> parameter - and this parameter
can not yet be used to determine overloaded method signatures

Parameters:
poTarget System.Object
The reference of the target object instance to invoke the method on
pcMethodName CHARACTER
The name of the generic method to invoke
pcMethodOfType CHARACTER
The name of the .NET Type for the <T> value of the method declaration
Returns System.Object
The invoked method return parameter
Top

PROTECTED System.Object InvokeGenericMethod (Object, character, character, integer, Object, character, Object, character, Object, character, Object, character, Object, character, Object, character, Object, character, Object, character, Object, character, Object, character)

Purpose: Invokes a public and non static .NET generic method
Notes: Currently only supports a single <T> parameter - and this parameter
can not yet be used to determine overloaded method signatures

Parameters:
poTarget System.Object
The reference of the target object instance to invoke the method on
pcMethodName CHARACTER
The name of the generic method to invoke
pcMethodOfType CHARACTER
The name of the .NET Type for the <T> value of the method declaration
piNumParameters INTEGER
The number of parameters passed to the method call
poParameter1 System.Object
The first method parameter
pcParameterType1 CHARACTER
The type of the first method parameter (as defined in the method)
poParameter2 System.Object
The second method parameter
pcParameterType2 CHARACTER
The type of the second method parameter (as defined in the method)
poParameter3 System.Object
The third method parameter
pcParameterType3 CHARACTER
The type of the third method parameter (as defined in the method)
poParameter4 System.Object
The fourth method parameter
pcParameterType4 CHARACTER
The type of the fourth method parameter (as defined in the method)
poParameter5 System.Object
The fifth method parameter
pcParameterType5 CHARACTER
The type of the fifth method parameter (as defined in the method)
poParameter6 System.Object
The sixth method parameter
pcParameterType6 CHARACTER
The type of the sixth method parameter (as defined in the method)
poParameter7 System.Object
The seventh method parameter
pcParameterType7 CHARACTER
The type of the seventh method parameter (as defined in the method)
poParameter8 System.Object
The eight method parameter
pcParameterType8 CHARACTER
The type of the eigth method parameter (as defined in the method)
poParameter9 System.Object
The nineth method parameter
pcParameterType9 CHARACTER
The type of the nineth method parameter (as defined in the method)
poParameter10 System.Object
The tenth method parameter
pcParameterType10 CHARACTER
The type of the tenth method parameter (as defined in the method)
Returns System.Object
The invoked method return parameter
Top

PUBLIC System.Object InvokeGenericMethod (Object, character, character, Object, character)

Purpose: Invokes a public and non static .NET generic method
Notes: Currently only supports a single <T> parameter - and this parameter
can not yet be used to determine overloaded method signatures

Parameters:
poTarget System.Object
The reference of the target object instance to invoke the method on
pcMethodName CHARACTER
The name of the generic method to invoke
pcMethodOfType CHARACTER
The name of the .NET Type for the <T> value of the method declaration
poParameter1 System.Object
The first method parameter
pcParameterType1 CHARACTER
The type of the first method parameter (as defined in the method)
Returns System.Object
The invoked method return parameter
Top

PUBLIC System.Object InvokeGenericMethod (Object, character, character, Object, character, Object, character)

Purpose: Invokes a public and non static .NET generic method
Notes: Currently only supports a single <T> parameter - and this parameter
can not yet be used to determine overloaded method signatures

Parameters:
poTarget System.Object
The reference of the target object instance to invoke the method on
pcMethodName CHARACTER
The name of the generic method to invoke
pcMethodOfType CHARACTER
The name of the .NET Type for the <T> value of the method declaration
poParameter1 System.Object
The first method parameter
pcParameterType1 CHARACTER
The type of the first method parameter (as defined in the method)
poParameter2 System.Object
The second method parameter
pcParameterType2 CHARACTER
The type of the second method parameter (as defined in the method)
Returns System.Object
The invoked method return parameter
Top

PUBLIC System.Object InvokeGenericMethod (Object, character, character, Object, character, Object, character, Object, character)

Purpose: Invokes a public and non static .NET generic method
Notes: Currently only supports a single <T> parameter - and this parameter
can not yet be used to determine overloaded method signatures

Parameters:
poTarget System.Object
The reference of the target object instance to invoke the method on
pcMethodName CHARACTER
The name of the generic method to invoke
pcMethodOfType CHARACTER
The name of the .NET Type for the <T> value of the method declaration
poParameter1 System.Object
The first method parameter
pcParameterType1 CHARACTER
The type of the first method parameter (as defined in the method)
poParameter2 System.Object
The second method parameter
pcParameterType2 CHARACTER
The type of the second method parameter (as defined in the method)
poParameter3 System.Object
The third method parameter
pcParameterType3 CHARACTER
The type of the third method parameter (as defined in the method)
Returns System.Object
The invoked method return parameter
Top

PUBLIC System.Object InvokeGenericMethod (Object, character, character, Object, character, Object, character, Object, character, Object, character)

Purpose: Invokes a public and non static .NET generic method
Notes: Currently only supports a single <T> parameter - and this parameter
can not yet be used to determine overloaded method signatures

Parameters:
poTarget System.Object
The reference of the target object instance to invoke the method on
pcMethodName CHARACTER
The name of the generic method to invoke
pcMethodOfType CHARACTER
The name of the .NET Type for the <T> value of the method declaration
poParameter1 System.Object
The first method parameter
pcParameterType1 CHARACTER
The type of the first method parameter (as defined in the method)
poParameter2 System.Object
The second method parameter
pcParameterType2 CHARACTER
The type of the second method parameter (as defined in the method)
poParameter3 System.Object
The third method parameter
pcParameterType3 CHARACTER
The type of the third method parameter (as defined in the method)
poParameter4 System.Object
The fourth method parameter
pcParameterType4 CHARACTER
The type of the fourth method parameter (as defined in the method)
Returns System.Object
The invoked method return parameter
Top

PUBLIC System.Object InvokeGenericMethod (Object, character, character, Object, character, Object, character, Object, character, Object, character, Object, character)

Purpose: Invokes a public and non static .NET generic method
Notes: Currently only supports a single <T> parameter - and this parameter
can not yet be used to determine overloaded method signatures

Parameters:
poTarget System.Object
The reference of the target object instance to invoke the method on
pcMethodName CHARACTER
The name of the generic method to invoke
pcMethodOfType CHARACTER
The name of the .NET Type for the <T> value of the method declaration
poParameter1 System.Object
The first method parameter
pcParameterType1 CHARACTER
The type of the first method parameter (as defined in the method)
poParameter2 System.Object
The second method parameter
pcParameterType2 CHARACTER
The type of the second method parameter (as defined in the method)
poParameter3 System.Object
The third method parameter
pcParameterType3 CHARACTER
The type of the third method parameter (as defined in the method)
poParameter4 System.Object
The fourth method parameter
pcParameterType4 CHARACTER
The type of the fourth method parameter (as defined in the method)
poParameter5 System.Object
The fifth method parameter
pcParameterType5 CHARACTER
The type of the fifth method parameter (as defined in the method)
Returns System.Object
The invoked method return parameter
Top

PUBLIC System.Object InvokeGenericMethod (Object, character, character, Object, character, Object, character, Object, character, Object, character, Object, character, Object, character)

Purpose: Invokes a public and non static .NET generic method
Notes: Currently only supports a single <T> parameter - and this parameter
can not yet be used to determine overloaded method signatures

Parameters:
poTarget System.Object
The reference of the target object instance to invoke the method on
pcMethodName CHARACTER
The name of the generic method to invoke
pcMethodOfType CHARACTER
The name of the .NET Type for the <T> value of the method declaration
poParameter1 System.Object
The first method parameter
pcParameterType1 CHARACTER
The type of the first method parameter (as defined in the method)
poParameter2 System.Object
The second method parameter
pcParameterType2 CHARACTER
The type of the second method parameter (as defined in the method)
poParameter3 System.Object
The third method parameter
pcParameterType3 CHARACTER
The type of the third method parameter (as defined in the method)
poParameter4 System.Object
The fourth method parameter
pcParameterType4 CHARACTER
The type of the fourth method parameter (as defined in the method)
poParameter5 System.Object
The fifth method parameter
pcParameterType5 CHARACTER
The type of the fifth method parameter (as defined in the method)
poParameter6 System.Object
The sixth method parameter
pcParameterType6 CHARACTER
The type of the sixth method parameter (as defined in the method)
Returns System.Object
The invoked method return parameter
Top

PUBLIC System.Object InvokeGenericMethod (Object, character, character, Object, character, Object, character, Object, character, Object, character, Object, character, Object, character, Object, character)

Purpose: Invokes a public and non static .NET generic method
Notes: Currently only supports a single <T> parameter - and this parameter
can not yet be used to determine overloaded method signatures

Parameters:
poTarget System.Object
The reference of the target object instance to invoke the method on
pcMethodName CHARACTER
The name of the generic method to invoke
pcMethodOfType CHARACTER
The name of the .NET Type for the <T> value of the method declaration
poParameter1 System.Object
The first method parameter
pcParameterType1 CHARACTER
The type of the first method parameter (as defined in the method)
poParameter2 System.Object
The second method parameter
pcParameterType2 CHARACTER
The type of the second method parameter (as defined in the method)
poParameter3 System.Object
The third method parameter
pcParameterType3 CHARACTER
The type of the third method parameter (as defined in the method)
poParameter4 System.Object
The fourth method parameter
pcParameterType4 CHARACTER
The type of the fourth method parameter (as defined in the method)
poParameter5 System.Object
The fifth method parameter
pcParameterType5 CHARACTER
The type of the fifth method parameter (as defined in the method)
poParameter6 System.Object
The sixth method parameter
pcParameterType6 CHARACTER
The type of the sixth method parameter (as defined in the method)
poParameter7 System.Object
The seventh method parameter
pcParameterType7 CHARACTER
The type of the seventh method parameter (as defined in the method)
Returns System.Object
The invoked method return parameter
Top

PUBLIC System.Object InvokeGenericMethod (Object, character, character, Object, character, Object, character, Object, character, Object, character, Object, character, Object, character, Object, character, Object, character)

Purpose: Invokes a public and non static .NET generic method
Notes: Currently only supports a single <T> parameter - and this parameter
can not yet be used to determine overloaded method signatures

Parameters:
poTarget System.Object
The reference of the target object instance to invoke the method on
pcMethodName CHARACTER
The name of the generic method to invoke
pcMethodOfType CHARACTER
The name of the .NET Type for the <T> value of the method declaration
poParameter1 System.Object
The first method parameter
pcParameterType1 CHARACTER
The type of the first method parameter (as defined in the method)
poParameter2 System.Object
The second method parameter
pcParameterType2 CHARACTER
The type of the second method parameter (as defined in the method)
poParameter3 System.Object
The third method parameter
pcParameterType3 CHARACTER
The type of the third method parameter (as defined in the method)
poParameter4 System.Object
The fourth method parameter
pcParameterType4 CHARACTER
The type of the fourth method parameter (as defined in the method)
poParameter5 System.Object
The fifth method parameter
pcParameterType5 CHARACTER
The type of the fifth method parameter (as defined in the method)
poParameter6 System.Object
The sixth method parameter
pcParameterType6 CHARACTER
The type of the sixth method parameter (as defined in the method)
poParameter7 System.Object
The seventh method parameter
pcParameterType7 CHARACTER
The type of the seventh method parameter (as defined in the method)
poParameter8 System.Object
The eight method parameter
pcParameterType8 CHARACTER
The type of the eigth method parameter (as defined in the method)
Returns System.Object
The invoked method return parameter
Top

PUBLIC System.Object InvokeGenericMethod (Object, character, character, Object, character, Object, character, Object, character, Object, character, Object, character, Object, character, Object, character, Object, character, Object, character)

Purpose: Invokes a public and non static .NET generic method
Notes: Currently only supports a single <T> parameter - and this parameter
can not yet be used to determine overloaded method signatures

Parameters:
poTarget System.Object
The reference of the target object instance to invoke the method on
pcMethodName CHARACTER
The name of the generic method to invoke
pcMethodOfType CHARACTER
The name of the .NET Type for the <T> value of the method declaration
poParameter1 System.Object
The first method parameter
pcParameterType1 CHARACTER
The type of the first method parameter (as defined in the method)
poParameter2 System.Object
The second method parameter
pcParameterType2 CHARACTER
The type of the second method parameter (as defined in the method)
poParameter3 System.Object
The third method parameter
pcParameterType3 CHARACTER
The type of the third method parameter (as defined in the method)
poParameter4 System.Object
The fourth method parameter
pcParameterType4 CHARACTER
The type of the fourth method parameter (as defined in the method)
poParameter5 System.Object
The fifth method parameter
pcParameterType5 CHARACTER
The type of the fifth method parameter (as defined in the method)
poParameter6 System.Object
The sixth method parameter
pcParameterType6 CHARACTER
The type of the sixth method parameter (as defined in the method)
poParameter7 System.Object
The seventh method parameter
pcParameterType7 CHARACTER
The type of the seventh method parameter (as defined in the method)
poParameter8 System.Object
The eight method parameter
pcParameterType8 CHARACTER
The type of the eigth method parameter (as defined in the method)
poParameter9 System.Object
The nineth method parameter
pcParameterType9 CHARACTER
The type of the nineth method parameter (as defined in the method)
Returns System.Object
The invoked method return parameter
Top

PUBLIC System.Object InvokeGenericMethod (Object, character, character, Object, character, Object, character, Object, character, Object, character, Object, character, Object, character, Object, character, Object, character, Object, character, Object, character)

Purpose: Invokes a public and non static .NET generic method
Notes: Currently only supports a single <T> parameter - and this parameter
can not yet be used to determine overloaded method signatures

Parameters:
poTarget System.Object
The reference of the target object instance to invoke the method on
pcMethodName CHARACTER
The name of the generic method to invoke
pcMethodOfType CHARACTER
The name of the .NET Type for the <T> value of the method declaration
poParameter1 System.Object
The first method parameter
pcParameterType1 CHARACTER
The type of the first method parameter (as defined in the method)
poParameter2 System.Object
The second method parameter
pcParameterType2 CHARACTER
The type of the second method parameter (as defined in the method)
poParameter3 System.Object
The third method parameter
pcParameterType3 CHARACTER
The type of the third method parameter (as defined in the method)
poParameter4 System.Object
The fourth method parameter
pcParameterType4 CHARACTER
The type of the fourth method parameter (as defined in the method)
poParameter5 System.Object
The fifth method parameter
pcParameterType5 CHARACTER
The type of the fifth method parameter (as defined in the method)
poParameter6 System.Object
The sixth method parameter
pcParameterType6 CHARACTER
The type of the sixth method parameter (as defined in the method)
poParameter7 System.Object
The seventh method parameter
pcParameterType7 CHARACTER
The type of the seventh method parameter (as defined in the method)
poParameter8 System.Object
The eight method parameter
pcParameterType8 CHARACTER
The type of the eigth method parameter (as defined in the method)
poParameter9 System.Object
The nineth method parameter
pcParameterType9 CHARACTER
The type of the nineth method parameter (as defined in the method)
poParameter10 System.Object
The tenth method parameter
pcParameterType10 CHARACTER
The type of the tenth method parameter (as defined in the method)
Returns System.Object
The invoked method return parameter
Top

PUBLIC SetPropertyValue (Object, character, Object)

Purpose: Dynamically Set a property value from a .NET object
Notes: Uses reflection, ABL Value types need to be BOXed

Parameters:
poObject System.Object
The object to set a property value for
pcPropertyName CHARACTER
The name of the property to set the value for
poValue System.Object
The value for the property


Constructor Detail
Top

PROTECTED ReflectionHelper ()

Purpose: Constructor for the ReflectionHelper class
Notes: Disallow instance creation



Temp-Table Detail


©2006-2019 Consultingwerk Ltd.         info@consultingwerk.de         http://www.consultingwerk.de       08.08.2019 23:57:48