static InvokeResult EndInvokeMethodInternalWithResult(IInvocableMethodOwnerMirror mirror, IAsyncResult asyncResult) { var result = EndInvokeMethodInternalWithResultImpl(asyncResult); mirror.ProcessResult(result); return(result); }
public static Task <IInvokeResult> InvokeMethodAsyncWithResult(this IInvocableMethodOwnerMirror mirror, ThreadMirror thread, MethodMirror method, IList <Value> arguments, InvokeOptions options = InvokeOptions.None) { var tcs = new TaskCompletionSource <IInvokeResult> (); BeginInvokeMethod(mirror, thread, method, arguments, options, iar => { try { tcs.SetResult(EndInvokeMethodInternalWithResult(mirror, iar)); } catch (OperationCanceledException) { tcs.TrySetCanceled(); } catch (Exception ex) { tcs.TrySetException(ex); } }, null); return(tcs.Task); }
public static IInvokeResult EndInvokeMethodWithResult(this IInvocableMethodOwnerMirror mirror, IAsyncResult asyncResult) { return(EndInvokeMethodInternalWithResult(mirror, asyncResult)); }
public static Value EndInvokeMethod(this IInvocableMethodOwnerMirror mirror, IAsyncResult asyncResult) { return(EndInvokeMethodInternal(mirror, asyncResult)); }
public static IAsyncResult BeginInvokeMethod(this IInvocableMethodOwnerMirror mirror, ThreadMirror thread, MethodMirror method, IList <Value> arguments, InvokeOptions options, AsyncCallback callback, object state) { return(BeginInvokeMethod(mirror.VirtualMachine, thread, method, mirror.GetThisObject(), arguments, options, callback, state)); }
public static Value InvokeMethod(this IInvocableMethodOwnerMirror mirror, ThreadMirror thread, MethodMirror method, IList <Value> arguments, InvokeOptions options = InvokeOptions.None) { return(InvokeMethod(mirror, mirror.VirtualMachine, thread, method, mirror.GetThisObject(), arguments, options)); }
static Value InvokeMethod(IInvocableMethodOwnerMirror mirror, VirtualMachine vm, ThreadMirror thread, MethodMirror method, Value this_obj, IList <Value> arguments, InvokeOptions options) { return(EndInvokeMethodInternal(mirror, BeginInvokeMethod(vm, thread, method, this_obj, arguments, options, null, null))); }
static Value EndInvokeMethodInternal(IInvocableMethodOwnerMirror mirror, IAsyncResult asyncResult) { InvokeResult res = EndInvokeMethodInternalWithResult(mirror, asyncResult); return(res.Result); }