public object CallMethod(string methodName, params object[] arguments)
{
if (_dispatch == null)
throw new InvalidOperationException();
if (methodName == null)
throw new ArgumentNullException("methodName");
try
{
return _dispatch.GetType().InvokeMember(methodName, BindingFlags.InvokeMethod, null, _dispatch, arguments);
}
catch
{
if (_engine._site._lastException != null)
throw _engine._site._lastException;
throw;
}
}