示例#1
0
        static int LoadAssembly(IntPtr L)
        {
            try
            {
                LuaReflection reflection = LuaReflection.Get(L);
                string        name       = ToLua.CheckString(L, 1);
                LuaDLL.lua_pushboolean(L, reflection.LoadAssembly(name));
            }
            catch (Exception e)
            {
                return(LuaDLL.toluaL_exception(L, e));
            }

            return(1);
        }
示例#2
0
        static int FindType(IntPtr L)
        {
            string          name       = ToLua.CheckString(L, 1);
            LuaReflection   reflection = LuaReflection.Get(L);
            List <Assembly> list       = reflection.list;
            Type            t          = null;

            for (int i = 0; i < list.Count; i++)
            {
                t = list[i].GetType(name);

                if (t != null)
                {
                    break;
                }
            }

            ToLua.Push(L, t);
            return(1);
        }