static int Exists(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>;
            }

            bool o = obj.Exists(arg0);
            LuaDLL.lua_pushboolean(L, o);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
Exemplo n.º 2
0
 static public int Exists(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.Exists(a1);
         pushValue(l, ret);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int Exists(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.Exists(a1);
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static int Exists(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);
         bool o = obj.Exists(arg0);
         LuaDLL.lua_pushboolean(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Exemplo n.º 5
0
        public static bool IsInstance(JObject jsonObject)
        {
            var properties = new System.Collections.Generic.List <JProperty>(jsonObject.Properties());

            return(properties.Exists(p => VERSION_KEY.Equals(p.Name)) && properties.Exists(p => DISPLAY_TEXT_KEY.Equals(p.Name)));
        }