Merge pull request #1162 from DavidKarlas/endInvokeWithResult
authorZoltan Varga <vargaz@gmail.com>
Tue, 15 Jul 2014 13:41:10 +0000 (15:41 +0200)
committerZoltan Varga <vargaz@gmail.com>
Tue, 15 Jul 2014 13:41:10 +0000 (15:41 +0200)
[Mono.Debugger.Soft] Added methods EndInvokeMethodWithResult to all mirrors

mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ObjectMirror.cs
mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/PrimitiveValue.cs
mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/StructMirror.cs
mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/TypeMirror.cs

index b24e52f257c6d7f1eec4818b9f6aa39fa24d37d3..d83e3a1a4813052efc3bd3654aa3e6858aa66d38 100644 (file)
@@ -165,6 +165,10 @@ namespace Mono.Debugger.Soft
                        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> ();
index 2e9c806f8bb8d4337507cb9774b13541be71ff59..2ba50c84d4c4831d6b044e47400c7ec2a5cb6f09 100644 (file)
@@ -55,5 +55,9 @@ namespace Mono.Debugger.Soft
                public Value EndInvokeMethod (IAsyncResult asyncResult) {
                        return ObjectMirror.EndInvokeMethodInternal (asyncResult);
                }
+
+               public InvokeResult EndInvokeMethodWithResult (IAsyncResult asyncResult) {
+                       return  ObjectMirror.EndInvokeMethodInternalWithResult (asyncResult);
+               }
        }
 }
\ No newline at end of file
index a1d2ad62f5319847de2ebdd005b24992ca2af5eb..1aa1a4ef5eecf9042ebcdab4e300494328ba5a58 100644 (file)
@@ -86,7 +86,21 @@ namespace Mono.Debugger.Soft
                }
 
                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
index 437689163ec93171b5fee5fdd4525562fdb88520..3970f2a57684af7e7bc02bee7f1517ebdbcd1df7 100644 (file)
@@ -806,6 +806,10 @@ namespace Mono.Debugger.Soft
                        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> ();