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));
            }
        }