I have an abstract class for Lua scripts. I have a method called Expose
which registers a function to the Lua environment.
protected void Expose(string name, MethodBase method)
{
this.Lua.RegisterFunction(name, this, method);
}
However, I want to make it easier by passing the method name only instead of doing this:
this.Expose(this.GetType().GetMethod(...
I want to be able to do this:
this.Expose(LuaExports.DoSomething);
So instead of passing MethodBase, what do I need to pass? Note that the passed argument can be a method that returns something, or a method that does not return anything.