static int _m_Handle(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                DCET.Model.MessageProxy gen_to_be_invoked = (DCET.Model.MessageProxy)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));
            }
        }
示例#2
0
        static int _m_Dispatch(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                DCET.Model.IMessageDispatcher gen_to_be_invoked = (DCET.Model.IMessageDispatcher)translator.FastGetCSObj(L, 1);



                {
                    DCET.Model.Session _session = (DCET.Model.Session)translator.GetObject(L, 2, typeof(DCET.Model.Session));
                    ushort             _opcode  = (ushort)LuaAPI.xlua_tointeger(L, 3);
                    object             _message = translator.GetObject(L, 4, typeof(object));

                    gen_to_be_invoked.Dispatch(_session, _opcode, _message);



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

                DCET.Model.Session gen_to_be_invoked = (DCET.Model.Session)translator.FastGetCSObj(L, 1);
                translator.Push(L, gen_to_be_invoked.Stream);
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
            return(1);
        }
示例#4
0
        static int _s_set_Error(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

                DCET.Model.Session gen_to_be_invoked = (DCET.Model.Session)translator.FastGetCSObj(L, 1);
                gen_to_be_invoked.Error = LuaAPI.xlua_tointeger(L, 2);
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
            return(0);
        }
示例#5
0
        static int _m_Send(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                DCET.Model.Session gen_to_be_invoked = (DCET.Model.Session)translator.FastGetCSObj(L, 1);


                int gen_param_count = LuaAPI.lua_gettop(L);

                if (gen_param_count == 2 && translator.Assignable <DCET.Model.IMessage>(L, 2))
                {
                    DCET.Model.IMessage _message = (DCET.Model.IMessage)translator.GetObject(L, 2, typeof(DCET.Model.IMessage));

                    gen_to_be_invoked.Send(_message);



                    return(0);
                }
                if (gen_param_count == 2 && translator.Assignable <System.IO.MemoryStream>(L, 2))
                {
                    System.IO.MemoryStream _stream = (System.IO.MemoryStream)translator.GetObject(L, 2, typeof(System.IO.MemoryStream));

                    gen_to_be_invoked.Send(_stream);



                    return(0);
                }
                if (gen_param_count == 3 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && translator.Assignable <object>(L, 3))
                {
                    ushort _opcode  = (ushort)LuaAPI.xlua_tointeger(L, 2);
                    object _message = translator.GetObject(L, 3, typeof(object));

                    gen_to_be_invoked.Send(_opcode, _message);



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

            return(LuaAPI.luaL_error(L, "invalid arguments to DCET.Model.Session.Send!"));
        }
示例#6
0
        static int __CreateInstance(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
                if (LuaAPI.lua_gettop(L) == 1)
                {
                    DCET.Model.Session gen_ret = new DCET.Model.Session();
                    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 DCET.Model.Session constructor!"));
        }
示例#7
0
        static int _m_Dispose(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                DCET.Model.Session gen_to_be_invoked = (DCET.Model.Session)translator.FastGetCSObj(L, 1);



                {
                    gen_to_be_invoked.Dispose(  );



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


                DCET.Model.NetworkComponent gen_to_be_invoked = (DCET.Model.NetworkComponent)translator.FastGetCSObj(L, 1);


                int gen_param_count = LuaAPI.lua_gettop(L);

                if (gen_param_count == 2 && translator.Assignable <System.Net.IPEndPoint>(L, 2))
                {
                    System.Net.IPEndPoint _ipEndPoint = (System.Net.IPEndPoint)translator.GetObject(L, 2, typeof(System.Net.IPEndPoint));

                    DCET.Model.Session gen_ret = gen_to_be_invoked.Create(_ipEndPoint);
                    translator.Push(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 2 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING))
                {
                    string _address = LuaAPI.lua_tostring(L, 2);

                    DCET.Model.Session gen_ret = gen_to_be_invoked.Create(_address);
                    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 DCET.Model.NetworkComponent.Create!"));
        }
示例#9
0
        static int _m_Awake(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                DCET.Model.Session gen_to_be_invoked = (DCET.Model.Session)translator.FastGetCSObj(L, 1);



                {
                    DCET.Model.AChannel _aChannel = (DCET.Model.AChannel)translator.GetObject(L, 2, typeof(DCET.Model.AChannel));

                    gen_to_be_invoked.Awake(_aChannel);



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


                DCET.Model.Session gen_to_be_invoked = (DCET.Model.Session)translator.FastGetCSObj(L, 1);



                {
                    DCET.Model.IResponse _message = (DCET.Model.IResponse)translator.GetObject(L, 2, typeof(DCET.Model.IResponse));

                    gen_to_be_invoked.Reply(_message);



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


                DCET.Model.Session gen_to_be_invoked = (DCET.Model.Session)translator.FastGetCSObj(L, 1);



                {
                    System.IO.MemoryStream _memoryStream = (System.IO.MemoryStream)translator.GetObject(L, 2, typeof(System.IO.MemoryStream));

                    gen_to_be_invoked.OnRead(_memoryStream);



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


                DCET.Model.NetworkComponent gen_to_be_invoked = (DCET.Model.NetworkComponent)translator.FastGetCSObj(L, 1);



                {
                    long _id = LuaAPI.lua_toint64(L, 2);

                    DCET.Model.Session gen_ret = gen_to_be_invoked.Get(_id);
                    translator.Push(L, gen_ret);



                    return(1);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
        static int _m_OnAccept(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                DCET.Model.NetworkComponent gen_to_be_invoked = (DCET.Model.NetworkComponent)translator.FastGetCSObj(L, 1);



                {
                    DCET.Model.AChannel _channel = (DCET.Model.AChannel)translator.GetObject(L, 2, typeof(DCET.Model.AChannel));

                    DCET.Model.Session gen_ret = gen_to_be_invoked.OnAccept(_channel);
                    translator.Push(L, gen_ret);



                    return(1);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
        static int _m_Handle(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                DCET.Model.MessageDispatcherComponent gen_to_be_invoked = (DCET.Model.MessageDispatcherComponent)translator.FastGetCSObj(L, 1);



                {
                    DCET.Model.Session     _session = (DCET.Model.Session)translator.GetObject(L, 2, typeof(DCET.Model.Session));
                    DCET.Model.MessageInfo _messageInfo; translator.Get(L, 3, out _messageInfo);

                    gen_to_be_invoked.Handle(_session, _messageInfo);



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


                DCET.Model.Session gen_to_be_invoked = (DCET.Model.Session)translator.FastGetCSObj(L, 1);



                {
                    DCET.Model.IRequest _request = (DCET.Model.IRequest)translator.GetObject(L, 2, typeof(DCET.Model.IRequest));

                    DCET.Model.ETTask <DCET.Model.IResponse> gen_ret = gen_to_be_invoked.Call(_request);
                    translator.Push(L, gen_ret);



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