public static RuntimeValue InvokeMethod(RuntimeThread thread, RuntimeFunction function, params RuntimeValue[] arguments) { var evaluation = thread.CreateEvaluation(); evaluation.Call(function, arguments); if (!evaluation.WaitForResult(3000)) { return(null); } return(evaluation.Result); }
public RuntimeValue CallMemberFunction(RuntimeThread thread, SymbolToken token, params RuntimeValue[] arguments) { ICorDebugFunction comFunction; ComObjectValue.GetVirtualMethod((uint)token.GetToken(), out comFunction); var evaluation = thread.CreateEvaluation(); evaluation.Call(comFunction, arguments.GetComValues().ToArray()); if (evaluation.WaitForResult(1000)) { return(evaluation.Result); } throw new TimeoutException("Evaluation timed out."); }
public static RuntimeValue InvokeMethod(RuntimeThread thread, RuntimeFunction function, params RuntimeValue[] arguments) { var evaluation = thread.CreateEvaluation(); evaluation.Call(function, arguments); if (!evaluation.WaitForResult(3000)) return null; return evaluation.Result; }
public RuntimeValue CallMemberFunction(RuntimeThread thread, SymbolToken token, params RuntimeValue[] arguments) { ICorDebugFunction comFunction; ComObjectValue.GetVirtualMethod((uint)token.GetToken(), out comFunction); var evaluation = thread.CreateEvaluation(); evaluation.Call(comFunction, arguments.GetComValues().ToArray()); if (evaluation.WaitForResult(1000)) return evaluation.Result; throw new TimeoutException("Evaluation timed out."); }