Пример #1
0
        static int __CreateInstance(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
                if (LuaAPI.lua_gettop(L) == 3 && translator.Assignable <System.Collections.Generic.List <FairyGUI.Utils.XML> >(L, 2) && (LuaAPI.lua_isnil(L, 3) || LuaAPI.lua_type(L, 3) == LuaTypes.LUA_TSTRING))
                {
                    System.Collections.Generic.List <FairyGUI.Utils.XML> _source = (System.Collections.Generic.List <FairyGUI.Utils.XML>)translator.GetObject(L, 2, typeof(System.Collections.Generic.List <FairyGUI.Utils.XML>));
                    string _selector = LuaAPI.lua_tostring(L, 3);

                    FairyGUI.Utils.XMLList.Enumerator gen_ret = new FairyGUI.Utils.XMLList.Enumerator(_source, _selector);
                    translator.Push(L, gen_ret);

                    return(1);
                }

                if (LuaAPI.lua_gettop(L) == 1)
                {
                    translator.Push(L, default(FairyGUI.Utils.XMLList.Enumerator));
                    return(1);
                }
            }
            catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
            return(LuaAPI.luaL_error(L, "invalid arguments to FairyGUI.Utils.XMLList.Enumerator constructor!"));
        }
Пример #2
0
        static int _m_GetEnumerator(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                FairyGUI.Utils.XML gen_to_be_invoked = (FairyGUI.Utils.XML)translator.FastGetCSObj(L, 1);


                int gen_param_count = LuaAPI.lua_gettop(L);

                if (gen_param_count == 1)
                {
                    FairyGUI.Utils.XMLList.Enumerator gen_ret = gen_to_be_invoked.GetEnumerator(  );
                    translator.Push(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 2 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING))
                {
                    string _selector = LuaAPI.lua_tostring(L, 2);

                    FairyGUI.Utils.XMLList.Enumerator gen_ret = gen_to_be_invoked.GetEnumerator(
                        _selector);
                    translator.Push(L, gen_ret);



                    return(1);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }

            return(LuaAPI.luaL_error(L, "invalid arguments to FairyGUI.Utils.XML.GetEnumerator!"));
        }