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.cs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/CompilerServices/CompilerServices.cs b/src/CompilerServices/CompilerServices.cs
index 42ae5f7b..e0d6c1e0 100644
--- a/src/CompilerServices/CompilerServices.cs
+++ b/src/CompilerServices/CompilerServices.cs
@@ -562,9 +562,11 @@ namespace Crow
}
internal static Delegate createDel(Type eventType, object instance, string method){
Type t = instance.GetType ();
- MethodInfo mi = t.GetMethod (method);
- if (mi == null)
+ MethodInfo mi = t.GetMethod (method, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance);
+ if (mi == null) {
+ Debug.WriteLine ("Handler Method '{0}' not found in '{1}'", method, t);
return null;
+ }
return Delegate.CreateDelegate (eventType, instance, mi);
}
public static Delegate compileDynEventHandler(EventInfo sourceEvent, string expression, NodeAddress currentNode = null){