static int _m_FindLastIndex(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); System.Collections.Generic.List <string> gen_to_be_invoked = (System.Collections.Generic.List <string>)translator.FastGetCSObj(L, 1); int gen_param_count = LuaAPI.lua_gettop(L); if (gen_param_count == 2 && translator.Assignable <System.Predicate <string> >(L, 2)) { System.Predicate <string> _match = translator.GetDelegate <System.Predicate <string> >(L, 2); int gen_ret = gen_to_be_invoked.FindLastIndex( _match); LuaAPI.xlua_pushinteger(L, gen_ret); return(1); } if (gen_param_count == 3 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && translator.Assignable <System.Predicate <string> >(L, 3)) { int _startIndex = LuaAPI.xlua_tointeger(L, 2); System.Predicate <string> _match = translator.GetDelegate <System.Predicate <string> >(L, 3); int gen_ret = gen_to_be_invoked.FindLastIndex( _startIndex, _match); LuaAPI.xlua_pushinteger(L, gen_ret); return(1); } if (gen_param_count == 4 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3) && translator.Assignable <System.Predicate <string> >(L, 4)) { int _startIndex = LuaAPI.xlua_tointeger(L, 2); int _count = LuaAPI.xlua_tointeger(L, 3); System.Predicate <string> _match = translator.GetDelegate <System.Predicate <string> >(L, 4); int gen_ret = gen_to_be_invoked.FindLastIndex( _startIndex, _count, _match); LuaAPI.xlua_pushinteger(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 System.Collections.Generic.List<string>.FindLastIndex!")); }
static public int FindLastIndex(IntPtr l) { try { int argc = LuaDLL.lua_gettop(l); if (argc == 2) { System.Collections.Generic.List <WWWRequest> self = (System.Collections.Generic.List <WWWRequest>)checkSelf(l); System.Predicate <WWWRequest> a1; checkDelegate(l, 2, out a1); var ret = self.FindLastIndex(a1); pushValue(l, true); pushValue(l, ret); return(2); } else if (argc == 3) { System.Collections.Generic.List <WWWRequest> self = (System.Collections.Generic.List <WWWRequest>)checkSelf(l); System.Int32 a1; checkType(l, 2, out a1); System.Predicate <WWWRequest> a2; checkDelegate(l, 3, out a2); var ret = self.FindLastIndex(a1, a2); pushValue(l, true); pushValue(l, ret); return(2); } else if (argc == 4) { System.Collections.Generic.List <WWWRequest> self = (System.Collections.Generic.List <WWWRequest>)checkSelf(l); System.Int32 a1; checkType(l, 2, out a1); System.Int32 a2; checkType(l, 3, out a2); System.Predicate <WWWRequest> a3; checkDelegate(l, 4, out a3); var ret = self.FindLastIndex(a1, a2, a3); pushValue(l, true); pushValue(l, ret); return(2); } pushValue(l, false); LuaDLL.lua_pushstring(l, "No matched override function FindLastIndex to call"); return(2); } catch (Exception e) { return(error(l, e)); } }
public int FindLastIndex(Predicate <T> match) { return(list.FindLastIndex(match)); }