aboutsummaryrefslogtreecommitdiffstatsci
path: root/src/CompilerServices/CompilerServices.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/CompilerServices/CompilerServices.cs')
-rw-r--r--src/CompilerServices/CompilerServices.cs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/CompilerServices/CompilerServices.cs b/src/CompilerServices/CompilerServices.cs
index 731d1b5e..ba824c62 100644
--- a/src/CompilerServices/CompilerServices.cs
+++ b/src/CompilerServices/CompilerServices.cs
@@ -28,6 +28,7 @@ namespace Crow
public static MethodInfo miCreateExpDel = typeof(ItemTemplate).GetMethod ("CreateExpandDelegate");
public static MethodInfo miLoadDefaultVals = typeof (GraphicObject).GetMethod ("loadDefaultValues");
public static PropertyInfo piStyle = typeof (GraphicObject).GetProperty ("Style");
+ public static MethodInfo miGetTypeFromHandle = typeof(Type).GetMethod("GetTypeFromHandle");
#region tree handling methods
internal static MethodInfo miSetChild = typeof (Container).GetMethod ("SetChild");
internal static MethodInfo miAddChild = typeof (Group).GetMethod ("AddChild");
@@ -635,6 +636,12 @@ namespace Crow
public static MemberInfo getMemberInfoWithReflexion(object instance, string member){
return instance.GetType ().GetMember (member).FirstOrDefault();
}
+ public static MethodInfo getMethodInfoWithReflexion(object instance, string method){
+ return instance.GetType ().GetMethod (method, BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public);
+ }
+ public static Type getEventHandlerType(object instance, string eventName){
+ return instance.GetType ().GetEvent (eventName).EventHandlerType;
+ }
public static object getValueWithReflexion(object instance, MemberInfo mi){
object tmp = null;
Type dstType = null;