Perhaps something like this:
As long as the calling pattern can be inferred from the arguments, you can support as many as you need.
Cheers!
engine.AddHostObject("$", new DollarSignFunc((arg1, arg2) => { var name = arg1 asstring; if (name == null) new Window(f).AddEventHandler("Load", arg1); elseif (arg2 != null) new Window(f).AddEventHandler(name, arg2); else { // add code here } }));
Cheers!