static int _m_Handle(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); DCET.Model.IMHandler gen_to_be_invoked = (DCET.Model.IMHandler)translator.FastGetCSObj(L, 1); { DCET.Model.Session _session = (DCET.Model.Session)translator.GetObject(L, 2, typeof(DCET.Model.Session)); object _message = translator.GetObject(L, 3, typeof(object)); DCET.Model.ETVoid gen_ret = gen_to_be_invoked.Handle(_session, _message); translator.Push(L, gen_ret); return(1); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } }
static int _m_GetMessageType(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); DCET.Model.IMHandler gen_to_be_invoked = (DCET.Model.IMHandler)translator.FastGetCSObj(L, 1); { System.Type gen_ret = gen_to_be_invoked.GetMessageType( ); translator.Push(L, gen_ret); return(1); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } }
static int _m_RegisterHandler(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); DCET.Model.MessageDispatcherComponent gen_to_be_invoked = (DCET.Model.MessageDispatcherComponent)translator.FastGetCSObj(L, 1); { ushort _opcode = (ushort)LuaAPI.xlua_tointeger(L, 2); DCET.Model.IMHandler _handler = (DCET.Model.IMHandler)translator.GetObject(L, 3, typeof(DCET.Model.IMHandler)); gen_to_be_invoked.RegisterHandler(_opcode, _handler); return(0); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } }