return EndInvokeMethodInternal (asyncResult);
}
+ public InvokeResult EndInvokeMethodWithResult (IAsyncResult asyncResult) {
+ return ObjectMirror.EndInvokeMethodInternalWithResult (asyncResult);
+ }
+
#if NET_4_5
public Task<Value> InvokeMethodAsync (ThreadMirror thread, MethodMirror method, IList<Value> arguments, InvokeOptions options = InvokeOptions.None) {
var tcs = new TaskCompletionSource<Value> ();
public Value EndInvokeMethod (IAsyncResult asyncResult) {
return ObjectMirror.EndInvokeMethodInternal (asyncResult);
}
+
+ public InvokeResult EndInvokeMethodWithResult (IAsyncResult asyncResult) {
+ return ObjectMirror.EndInvokeMethodInternalWithResult (asyncResult);
+ }
}
}
\ No newline at end of file
}
public Value EndInvokeMethod (IAsyncResult asyncResult) {
- return ObjectMirror.EndInvokeMethodInternal (asyncResult);
+ var result = ObjectMirror.EndInvokeMethodInternalWithResult (asyncResult);
+ var outThis = result.OutThis as StructMirror;
+ if (outThis != null) {
+ SetFields (outThis.Fields);
+ }
+ return result.Result;
+ }
+
+ public InvokeResult EndInvokeMethodWithResult (IAsyncResult asyncResult) {
+ var result = ObjectMirror.EndInvokeMethodInternalWithResult (asyncResult);
+ var outThis = result.OutThis as StructMirror;
+ if (outThis != null) {
+ SetFields (outThis.Fields);
+ }
+ return result;
}
#if NET_4_5
return ObjectMirror.EndInvokeMethodInternal (asyncResult);
}
+ public InvokeResult EndInvokeMethodWithResult (IAsyncResult asyncResult) {
+ return ObjectMirror.EndInvokeMethodInternalWithResult (asyncResult);
+ }
+
#if NET_4_5
public Task<Value> InvokeMethodAsync (ThreadMirror thread, MethodMirror method, IList<Value> arguments, InvokeOptions options = InvokeOptions.None) {
var tcs = new TaskCompletionSource<Value> ();