Ejemplo n.º 1
0
        static int _m_Equals(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                MongoDB.Bson.BsonInt32 gen_to_be_invoked = (MongoDB.Bson.BsonInt32)translator.FastGetCSObj(L, 1);


                int gen_param_count = LuaAPI.lua_gettop(L);

                if (gen_param_count == 2 && translator.Assignable <MongoDB.Bson.BsonInt32>(L, 2))
                {
                    MongoDB.Bson.BsonInt32 _rhs = (MongoDB.Bson.BsonInt32)translator.GetObject(L, 2, typeof(MongoDB.Bson.BsonInt32));

                    bool gen_ret = gen_to_be_invoked.Equals(_rhs);
                    LuaAPI.lua_pushboolean(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 2 && translator.Assignable <object>(L, 2))
                {
                    object _obj = translator.GetObject(L, 2, typeof(object));

                    bool gen_ret = gen_to_be_invoked.Equals(_obj);
                    LuaAPI.lua_pushboolean(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 MongoDB.Bson.BsonInt32.Equals!"));
        }