LuaInterface - how-to restrict access to .Net classes?

后端 未结 2 1643
情话喂你
情话喂你 2021-02-06 11:19

I\'m trying to embed some Lua scripting functionality in my C# app by using LuaInterface 2.0.3. This is working just fine so far, but I can\'t figure out how to restrict access

2条回答
  •  温柔的废话
    2021-02-06 12:15

    I'm not really sure about how exactly you would go about it, but the first step should be hosting it in an extra AppDomain. With that extra appdomain, you have granular control of what modules can be used and which can't, however, it will add extra work to get data moved between your main program and the script.

    The AssemblyLoad/AssemblyResolve events should be your first stop.

提交回复
热议问题