// Everything below came from the Gtk# source:
        public static Type ConvertSignal(Type widgetType, string gladeName)
        {
            //Console.WriteLine("ConvertSignal: " + widgetType.ToString() + " " + gladeName);
            System.Reflection.MemberFilter signalFilter = new System.Reflection.MemberFilter (SignalFilter);
            System.Reflection.MemberInfo[] evnts = widgetType.
                                        FindMembers (System.Reflection.MemberTypes.Event,
                                             System.Reflection.BindingFlags.Instance
                                             | System.Reflection.BindingFlags.Static
                                             | System.Reflection.BindingFlags.Public
                                             | System.Reflection.BindingFlags.NonPublic,
                                             signalFilter, gladeName);

            return (evnts[0] as EventInfo).EventHandlerType;
        }
 public static Delegate System_Reflection_MemberFilter(LuaFunction func)
 {
     System.Reflection.MemberFilter d = (param0, param1) =>
     {
         int    top = func.BeginPCall();
         IntPtr L   = func.GetLuaState();
         LuaScriptMgr.PushObject(L, param0);
         LuaScriptMgr.PushVarObject(L, param1);
         func.PCall(top, 2);
         object[] objs = func.PopValues(top);
         func.EndPCall(top);
         return((bool)objs[0]);
     };
     return(d);
 }
示例#3
0
 public virtual System.Reflection.MemberInfo[] FindMembers(System.Reflection.MemberTypes memberType, System.Reflection.BindingFlags bindingAttr, System.Reflection.MemberFilter filter, object filterCriteria)
 {
     throw null;
 }