コード例 #1
0
        static int _g_get_pwd(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

                SQLRequestAgent gen_to_be_invoked = (SQLRequestAgent)translator.FastGetCSObj(L, 1);
                LuaAPI.lua_pushstring(L, gen_to_be_invoked.pwd);
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
            return(1);
        }
コード例 #2
0
        static int _s_set_connectionMethod(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

                SQLRequestAgent gen_to_be_invoked = (SQLRequestAgent)translator.FastGetCSObj(L, 1);
                gen_to_be_invoked.connectionMethod = LuaAPI.lua_tostring(L, 2);
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
            return(0);
        }
コード例 #3
0
        static int __CreateInstance(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
                if (LuaAPI.lua_gettop(L) == 1)
                {
                    var gen_ret = new SQLRequestAgent();
                    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 SQLRequestAgent constructor!"));
        }
コード例 #4
0
        static int _m_Test(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                SQLRequestAgent gen_to_be_invoked = (SQLRequestAgent)translator.FastGetCSObj(L, 1);



                {
                    gen_to_be_invoked.Test(  );



                    return(0);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
コード例 #5
0
        static int _m_PerformSQLRequest(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                SQLRequestAgent gen_to_be_invoked = (SQLRequestAgent)translator.FastGetCSObj(L, 1);



                {
                    string _query = LuaAPI.lua_tostring(L, 2);
                    SQLRequestAgent.SQLDataReaderCallback _callback = translator.GetDelegate <SQLRequestAgent.SQLDataReaderCallback>(L, 3);

                    gen_to_be_invoked.PerformSQLRequest(_query, _callback);



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