Merge pull request #556 from jack-pappas/ipproto-patch
[mono.git] / mcs / class / corlib / System.Runtime.Remoting.Messaging / MethodResponse.cs
index ddcfbe214813bb6e17f2d11de0044ffae5f3ad14..34d3bfb6b7eb9e314ebf2cd613f5e8bc2920c0ee 100644 (file)
@@ -39,6 +39,7 @@ using System.Runtime.Serialization;
 namespace System.Runtime.Remoting.Messaging {
 
        [Serializable] [CLSCompliant (false)]
+       [System.Runtime.InteropServices.ComVisible (true)]
        public class MethodResponse : IMethodReturnMessage, ISerializable, IInternalMessage, ISerializationRootObject
        {
                string _methodName;
@@ -60,7 +61,7 @@ namespace System.Runtime.Remoting.Messaging {
                protected IDictionary ExternalProperties;
                protected IDictionary InternalProperties;
 
-               public MethodResponse (Header[] headers, IMethodCallMessage mcm)
+               public MethodResponse (Header[] h1, IMethodCallMessage mcm)
                {
                        if (mcm != null)
                        {
@@ -72,9 +73,9 @@ namespace System.Runtime.Remoting.Messaging {
                                _args = mcm.Args;
                        }
 
-                       if (headers != null)
+                       if (h1 != null)
                        {
-                               foreach (Header header in headers)
+                               foreach (Header header in h1)
                                        InitMethodProperty (header.Name, header.Value);
                        }
                }
@@ -269,6 +270,11 @@ namespace System.Runtime.Remoting.Messaging {
                        }
                }
 
+               string IInternalMessage.Uri {
+                       get { return Uri; }
+                       set { Uri = value; }
+               }
+
                public object GetArg (int argNum)
                {
                        if (null == _args)
@@ -327,7 +333,7 @@ namespace System.Runtime.Remoting.Messaging {
                }
 
                [MonoTODO]
-               public void RootSetObjectData (SerializationInfo info, StreamingContext context)
+               public void RootSetObjectData (SerializationInfo info, StreamingContext ctx)
                {
                        throw new NotImplementedException ();
                } 
@@ -338,30 +344,5 @@ namespace System.Runtime.Remoting.Messaging {
                        set { _targetIdentity = value; }
                }
 
-               public override string ToString ()
-               {
-                       string s = _typeName.Split(',')[0] + "." + _methodName + " (";
-                       if (_exception != null)
-                       {
-                               s += "Exception\n)" + _exception;
-                       }
-                       else
-                       {
-                               if (_args != null)
-                               {
-                                       for (int n=0; n<_args.Length; n++)
-                                       {
-                                               if (n>0) s+= ", ";
-                                               if (_args[n] != null) s += _args[n].GetType().Name + " ";
-                                               s += GetOutArgName (n);
-                                               if (_args[n] != null) s += " = {" + _args[n] + "}";
-                                               else s+=" = {null}";
-                                       }
-                               }
-                               s += ")";
-                       }
-                       return s;
-               }
-
        }
 }