|
|
@@ -23,17 +23,19 @@ namespace System.Runtime.Remoting.Proxies
|
|
|
|
|
|
public class RemotingProxy : RealProxy
|
|
|
{
|
|
|
- static MethodInfo _cache_GetTypeMethod = typeof(System.Object).GetMethod("GetType");
|
|
|
- static MethodInfo _cache_GetHashCodeMethod = typeof(System.Object).GetMethod("GetHashCode");
|
|
|
-
|
|
|
+ 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);
|
|
|
+ return new MethodResponse(ObjectIdentity.GetHashCode(), null, null, request as IMethodCallMessage);
|
|
|
|
|
|
if (mMsg.MethodBase == _cache_GetTypeMethod)
|
|
|
- return new MethodResponse(GetProxiedType(), null, null, request as IMethodCallMessage);
|
|
|
+ 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)
|
|
|
{
|