* RemotingProxy.cs: Assign to the message the full uri, if available,
authorLluis Sanchez <lluis@novell.com>
Wed, 16 Jul 2003 10:29:33 +0000 (10:29 -0000)
committerLluis Sanchez <lluis@novell.com>
Wed, 16 Jul 2003 10:29:33 +0000 (10:29 -0000)
  not only the object uri.

svn path=/trunk/mcs/; revision=16305

mcs/class/corlib/System.Runtime.Remoting.Proxies/ChangeLog
mcs/class/corlib/System.Runtime.Remoting.Proxies/RemotingProxy.cs

index b2b3de0d2e3b7f88b0862f5764df081b58aa670a..cb1b9768f6832275536a21d5dbdf82e7dae8c679 100644 (file)
@@ -1,3 +1,8 @@
+2003-07-16  Lluis Sanchez Gual <lluis@ximian.com>
+
+       * RemotingProxy.cs: Assign to the message the full uri, if available,
+         not only the object uri.
+
 2003-04-10  Lluis Sanchez Gual <lluis@ideary.com>
 
        * RemotingProxy.cs: Added support for Async and OneWay messages.
index 84ceaf08e9dc2c04809ff26bdad2a813fa03e44b..ff38a0099d3f7ef9255fa4fed49f5b602507a4d0 100644 (file)
@@ -23,17 +23,19 @@ namespace System.Runtime.Remoting.Proxies
 
        public class RemotingProxy : RealProxy 
        {
-               static MethodInfo _cache_GetTypeMethod = typeof(System.Object).GetMethod("GetType");\r
-               static MethodInfo _cache_GetHashCodeMethod = typeof(System.Object).GetMethod("GetHashCode");\r
-\r
+               static MethodInfo _cache_GetTypeMethod = typeof(System.Object).GetMethod("GetType");
+               static MethodInfo _cache_GetHashCodeMethod = typeof(System.Object).GetMethod("GetHashCode");
+
                IMessageSink _sink;
                bool _hasEnvoySink;
                ConstructionCall _ctorCall;
+               string _targetUri;
 
                internal RemotingProxy (Type type, ClientIdentity identity) : base (type, identity)
                {
                        _sink = identity.ChannelSink;
                        _hasEnvoySink = false;
+                       _targetUri = identity.TargetUri;
                }
 
                internal RemotingProxy (Type type, string activationUrl, object[] activationAttributes) : base (type)
@@ -50,12 +52,12 @@ namespace System.Runtime.Remoting.Proxies
                                return ActivateRemoteObject (mMsg);
 
                        if (mMsg.MethodBase == _cache_GetHashCodeMethod)
-                               return new MethodResponse(ObjectIdentity.GetHashCode(), null, null, request as IMethodCallMessage);\r
+                               return new MethodResponse(ObjectIdentity.GetHashCode(), null, null, request as IMethodCallMessage);
 
                        if (mMsg.MethodBase == _cache_GetTypeMethod)
-                               return new MethodResponse(GetProxiedType(), null, null, request as IMethodCallMessage);\r
+                               return new MethodResponse(GetProxiedType(), null, null, request as IMethodCallMessage);
 
-                       mMsg.Uri = _objectIdentity.ObjectUri;
+                       mMsg.Uri = _targetUri;
                        ((IInternalMessage)mMsg).TargetIdentity = _objectIdentity;
 
                        _objectIdentity.NotifyClientDynamicSinks (true, request, true, false);
@@ -96,7 +98,12 @@ namespace System.Runtime.Remoting.Proxies
                        }
 
                        if (identity is ClientIdentity)
+                       {
                                ((ClientIdentity)identity).ClientProxy = (MarshalByRefObject) GetTransparentProxy();
+                               _targetUri = ((ClientIdentity)identity).TargetUri;
+                       }
+                       else
+                               _targetUri = identity.ObjectUri;
 
                        if (_objectIdentity.EnvoySink != null) 
                        {