static int FindLast(IntPtr L)
    {
        try
        {
            ToLua.CheckArgsCount(L, 2);
            System.Collections.Generic.List <string> obj = (System.Collections.Generic.List <string>)ToLua.CheckObject(L, 1, typeof(System.Collections.Generic.List <string>));
            System.Predicate <string> arg0 = null;
            LuaTypes funcType2             = LuaDLL.lua_type(L, 2);

            if (funcType2 != LuaTypes.LUA_TFUNCTION)
            {
                arg0 = (System.Predicate <string>)ToLua.CheckObject(L, 2, typeof(System.Predicate <string>));
            }
            else
            {
                LuaFunction func = ToLua.ToLuaFunction(L, 2);
                arg0 = DelegateFactory.CreateDelegate(typeof(System.Predicate <string>), func) as System.Predicate <string>;
            }

            string o = obj.FindLast(arg0);
            LuaDLL.lua_pushstring(L, o);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
Beispiel #2
0
 static public int FindLast(IntPtr l)
 {
     try {
         System.Collections.Generic.List <UnityEngine.GameObject> self = (System.Collections.Generic.List <UnityEngine.GameObject>)checkSelf(l);
         System.Predicate <UnityEngine.GameObject> a1;
         LuaDelegation.checkDelegate(l, 2, out a1);
         var ret = self.FindLast(a1);
         pushValue(l, ret);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int FindLast(IntPtr l)
 {
     try {
         System.Collections.Generic.List <System.Int32> self = (System.Collections.Generic.List <System.Int32>)checkSelf(l);
         System.Predicate <System.Int32> a1;
         LuaDelegation.checkDelegate(l, 2, out a1);
         var ret = self.FindLast(a1);
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static int FindLast(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         System.Collections.Generic.List <string> obj = (System.Collections.Generic.List <string>)ToLua.CheckObject(L, 1, typeof(System.Collections.Generic.List <string>));
         System.Predicate <string> arg0 = (System.Predicate <string>)ToLua.CheckDelegate <System.Predicate <string> >(L, 2);
         string o = obj.FindLast(arg0);
         LuaDLL.lua_pushstring(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
 static int FindLast(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         System.Collections.Generic.List <UnityEngine.GameObject> obj = (System.Collections.Generic.List <UnityEngine.GameObject>)ToLua.CheckObject(L, 1, typeof(System.Collections.Generic.List <UnityEngine.GameObject>));
         System.Predicate <UnityEngine.GameObject> arg0 = (System.Predicate <UnityEngine.GameObject>)ToLua.CheckDelegate <System.Predicate <UnityEngine.GameObject> >(L, 2);
         UnityEngine.GameObject o = obj.FindLast(arg0);
         ToLua.PushSealed(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Beispiel #6
0
 static int FindLast(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         System.Collections.Generic.List <ServerInfo> obj = (System.Collections.Generic.List <ServerInfo>)ToLua.CheckObject(L, 1, typeof(System.Collections.Generic.List <ServerInfo>));
         System.Predicate <ServerInfo> arg0 = (System.Predicate <ServerInfo>)ToLua.CheckDelegate <System.Predicate <ServerInfo> >(L, 2);
         ServerInfo o = obj.FindLast(arg0);
         ToLua.PushObject(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Beispiel #7
0
 public T FindLast(Predicate <T> predicate)
 => _list.FindLast(predicate);