static int _m_Seek(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); ETCold.CircularBuffer gen_to_be_invoked = (ETCold.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)); } }
static int _s_set_ChunkSize(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); ETCold.CircularBuffer gen_to_be_invoked = (ETCold.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); }
static int _g_get_Position(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); ETCold.CircularBuffer gen_to_be_invoked = (ETCold.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); }
static int __CreateInstance(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); if (LuaAPI.lua_gettop(L) == 1) { ETCold.CircularBuffer gen_ret = new ETCold.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 ETCold.CircularBuffer constructor!")); }
static int _m_Read(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); ETCold.CircularBuffer gen_to_be_invoked = (ETCold.CircularBuffer)translator.FastGetCSObj(L, 1); int gen_param_count = LuaAPI.lua_gettop(L); if (gen_param_count == 3 && translator.Assignable <System.IO.Stream>(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3)) { System.IO.Stream _stream = (System.IO.Stream)translator.GetObject(L, 2, typeof(System.IO.Stream)); int _count = LuaAPI.xlua_tointeger(L, 3); gen_to_be_invoked.Read( _stream, _count); return(0); } if (gen_param_count == 4 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 4)) { byte[] _buffer = LuaAPI.lua_tobytes(L, 2); int _offset = LuaAPI.xlua_tointeger(L, 3); int _count = LuaAPI.xlua_tointeger(L, 4); int gen_ret = gen_to_be_invoked.Read( _buffer, _offset, _count); LuaAPI.xlua_pushinteger(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 ETCold.CircularBuffer.Read!")); }
static int _m_Flush(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); ETCold.CircularBuffer gen_to_be_invoked = (ETCold.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)); } }
static int _m_SetLength(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); ETCold.CircularBuffer gen_to_be_invoked = (ETCold.CircularBuffer)translator.FastGetCSObj(L, 1); { long _value = LuaAPI.lua_toint64(L, 2); gen_to_be_invoked.SetLength( _value); return(0); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } }
static int _m_InternalWriteByte(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); ETCold.CircularBuffer gen_to_be_invoked = (ETCold.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)); } }
static int _m_WriteUshort(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); ETCold.CircularBuffer gen_to_be_invoked = (ETCold.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)); } }