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