using System; namespace LuaInterface { internal class DelegateGenerator { private ObjectTranslator translator; private Type delegateType; public DelegateGenerator(ObjectTranslator translator, Type delegateType) { this.translator = translator; this.delegateType = delegateType; } public object extractGenerated(IntPtr luaState, int stackPos) { return CodeGeneration.Instance.GetDelegate(delegateType, translator.getFunction(luaState, stackPos)); } } }