Dec 29, 2009 at 5:29 PM
Edited Dec 29, 2009 at 5:31 PM
Where foo is some function assigned through JintEngine.SetFunction(name, delegate), the fix I came up with - which probably won't work everywhere was to expand the clrParameters object array in ClrFunction.Execute() in Native/ClrFunction.cs
So I changed line #23 in Native/ClrFunction.cs to look like this:
int clrParameterCount = Delegate.Method.GetParameters().Length;
object clrParameters = new object[clrParameterCount];
Instead of the old one that used parameters.Length, what this will do is call the delegate - all the arguments you don't specify any parameters for will be null.