2008-01-15 Stephane Delcroix <sdelcroix@novell.com>
[mono.git] / mcs / class / corlib / System.Runtime.Remoting.Messaging / ReturnMessage.cs
index c3cda345465f2c4227cc4b3eb787745dc5203ef7..aee39f5bb81103129491a363a4e1641fd44a3d56 100644 (file)
@@ -37,6 +37,9 @@ using System.IO;
 
 namespace System.Runtime.Remoting.Messaging 
 {
+#if NET_2_0
+       [System.Runtime.InteropServices.ComVisible (true)]
+#endif
        public class ReturnMessage : IMethodReturnMessage, IMethodMessage, IMessage, IInternalMessage 
        {
                object[] _outArgs;
@@ -75,8 +78,10 @@ namespace System.Runtime.Remoting.Messaging
                {
                        _exception = exc;
                        
-                       if (request != null)
+                       if (request != null) {
                                _methodBase = request.MethodBase;
+                               _callCtx = request.LogicalCallContext;
+                       }
                        _args = new object[0];  // .NET does this
                }
                
@@ -161,6 +166,11 @@ namespace System.Runtime.Remoting.Messaging
                        }
                }
 
+               string IInternalMessage.Uri {
+                       get { return Uri; }
+                       set { Uri = value; }
+               }
+
                public object GetArg (int arg_num)
                {
                        return _args [arg_num];
@@ -219,6 +229,7 @@ namespace System.Runtime.Remoting.Messaging
                        set { _targetIdentity = value; }
                }
 
+#if !NET_2_0
                public override string ToString ()
                {
                        string s = TypeName.Split(',')[0] + "." + MethodName + " (";
@@ -240,5 +251,6 @@ namespace System.Runtime.Remoting.Messaging
                        }
                        return s;
                }
+#endif
        }
 }