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


                DCETRuntime.CircularBuffer gen_to_be_invoked = (DCETRuntime.CircularBuffer)translator.FastGetCSObj(L, 1);



                {
                    byte[] _buffer = LuaAPI.lua_tobytes(L, 2);
                    int    _offset = LuaAPI.xlua_tointeger(L, 3);
                    int    _count  = LuaAPI.xlua_tointeger(L, 4);

                    gen_to_be_invoked.Write(
                        _buffer,
                        _offset,
                        _count);



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


                DCETRuntime.CircularBuffer gen_to_be_invoked = (DCETRuntime.CircularBuffer)translator.FastGetCSObj(L, 1);



                {
                    long _offset = LuaAPI.lua_toint64(L, 2);
                    System.IO.SeekOrigin _origin; translator.Get(L, 3, out _origin);

                    long gen_ret = gen_to_be_invoked.Seek(
                        _offset,
                        _origin);
                    LuaAPI.lua_pushint64(L, gen_ret);



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


                DCETRuntime.CircularBuffer gen_to_be_invoked = (DCETRuntime.CircularBuffer)translator.FastGetCSObj(L, 1);



                {
                    System.IO.MemoryStream _memoryStream = (System.IO.MemoryStream)translator.GetObject(L, 2, typeof(System.IO.MemoryStream));
                    int _offset = LuaAPI.xlua_tointeger(L, 3);
                    int _count  = LuaAPI.xlua_tointeger(L, 4);

                    int gen_ret = gen_to_be_invoked.ReadMemoryStream(
                        _memoryStream,
                        _offset,
                        _count);
                    LuaAPI.xlua_pushinteger(L, gen_ret);



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


                DCETRuntime.CircularBuffer gen_to_be_invoked = (DCETRuntime.CircularBuffer)translator.FastGetCSObj(L, 1);



                {
                    System.IO.Stream _stream = (System.IO.Stream)translator.GetObject(L, 2, typeof(System.IO.Stream));

                    System.Threading.Tasks.Task <int> gen_ret = gen_to_be_invoked.WriteAsync(
                        _stream);
                    translator.Push(L, gen_ret);



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

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

                DCETRuntime.CircularBuffer gen_to_be_invoked = (DCETRuntime.CircularBuffer)translator.FastGetCSObj(L, 1);
                LuaAPI.lua_pushint64(L, gen_to_be_invoked.Position);
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
            return(1);
        }
コード例 #7
0
        static int __CreateInstance(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
                if (LuaAPI.lua_gettop(L) == 1)
                {
                    DCETRuntime.CircularBuffer gen_ret = new DCETRuntime.CircularBuffer();
                    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 DCETRuntime.CircularBuffer constructor!"));
        }
コード例 #8
0
        static int _m_Flush(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                DCETRuntime.CircularBuffer gen_to_be_invoked = (DCETRuntime.CircularBuffer)translator.FastGetCSObj(L, 1);



                {
                    gen_to_be_invoked.Flush(  );



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


                DCETRuntime.CircularBuffer gen_to_be_invoked = (DCETRuntime.CircularBuffer)translator.FastGetCSObj(L, 1);



                {
                    System.Net.Sockets.SocketAsyncEventArgs _eventArgs = (System.Net.Sockets.SocketAsyncEventArgs)translator.GetObject(L, 2, typeof(System.Net.Sockets.SocketAsyncEventArgs));

                    gen_to_be_invoked.SetLastBuffer(
                        _eventArgs);



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


                DCETRuntime.CircularBuffer gen_to_be_invoked = (DCETRuntime.CircularBuffer)translator.FastGetCSObj(L, 1);



                {
                    byte _b = (byte)LuaAPI.xlua_tointeger(L, 2);

                    gen_to_be_invoked.InternalWriteByte(
                        _b);



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


                DCETRuntime.CircularBuffer gen_to_be_invoked = (DCETRuntime.CircularBuffer)translator.FastGetCSObj(L, 1);



                {
                    ushort _num = (ushort)LuaAPI.xlua_tointeger(L, 2);

                    gen_to_be_invoked.WriteUshort(
                        _num);



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