Esempio n. 1
0
        public void Refresh()
        {
            _cache.Clear();

            Action <ScriptState> loopAction = l =>
            {
                var key   = DataHelper.GetObject(l, -2);
                var value = DataHelper.GetObject(l, -1);
                _cache.Add(key, value);
            };

            LuaCore.ResetTop(_luaState, l => LuaCore.ForeachTable(l, _index, loopAction));
        }