From 0819cdcf926fe7d54e85cbee440c2b334676b2b3 Mon Sep 17 00:00:00 2001 From: jpbruyere Date: Thu, 15 Dec 2016 18:32:52 +0100 Subject: emit bind datasource handler methods modifié : src/CompilerServices/CompilerServices.cs modifié : src/IML/Context.cs modifié : src/Instantiator.cs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/CompilerServices/CompilerServices.cs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/CompilerServices/CompilerServices.cs') 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; -- cgit v1.3.1-4-g156e