Example #1
0
        public void Clean(IDictionary<string,object> table)
        {
            if (table == null)
                return;

            table.RemoveIfEqual("assert", (Func<object, object, object[], Varargs>)Assert);
            table.RemoveIfEqual("collectgarbage", (Action<string, string>)CollectGarbage);
            table.RemoveIfEqual("dofile", (Func<string, object>)DoFile);
            table.RemoveIfEqual("error", (Action<object, object>)Error);
            table.RemoveIfEqual("_ENV", table);
            table.RemoveIfEqual("_G", table);
            table.RemoveIfEqual("getfenv", (Func<object, object>)GetFEnv);
            table.RemoveIfEqual("getmetatable", (Func<object, object>)GetMetatable);
            table.RemoveIfEqual("ipairs", (Func<LuaTable, Varargs>)IPairs);
            table.RemoveIfEqual("load", (Func<Delegate, string, Varargs>)Load);
            table.RemoveIfEqual("loadfile", (Func<string, Varargs>)LoadFile);
            table.RemoveIfEqual("loadstring", (Func<string, string, Varargs>)LoadString);
            table.RemoveIfEqual("next", (Func<LuaTable, object, Varargs>)Next);
            table.RemoveIfEqual("pairs", (Func<LuaTable, Varargs>)Pairs);
            table.RemoveIfEqual("pcall", (Func<Delegate, object[], Varargs>)PCall);
            table.RemoveIfEqual("print", (Action<object[]>)Print);
            table.RemoveIfEqual("rawequal", (Func<object, object, bool>)RawEqual);
            table.RemoveIfEqual("rawget", (Func<LuaTable, object, object>)RawGet);
            table.RemoveIfEqual("rawset", (Func<LuaTable, object, object, object>)RawSet);
            table.RemoveIfEqual("select", (Func<object, object[], Varargs>)Select);
            table.RemoveIfEqual("setfenv", (Func<object, LuaTable, object>)SetFEnv);
            table.RemoveIfEqual("setmetatable", (Func<LuaTable, LuaTable, LuaTable>)SetMetatable);
            table.RemoveIfEqual("tonumber", (Func<object, object, object>)ToNumber);
            table.RemoveIfEqual("tostring", (Func<object, object>)ToString);
            table.RemoveIfEqual("type", (Func<object, string>)Type);
            table.RemoveIfEqual("unpack", (Func<LuaTable, object, object, Varargs>)Unpack);
            table.RemoveIfEqual("_VERSION", Constant.LUA_VERSION);
            table.RemoveIfEqual("xpcall", (Func<Delegate, Delegate, Varargs>)XPCall);
        }