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)
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);
}
if (identity is ClientIdentity)
+ {
((ClientIdentity)identity).ClientProxy = (MarshalByRefObject) GetTransparentProxy();
+ _targetUri = ((ClientIdentity)identity).TargetUri;
+ }
+ else
+ _targetUri = identity.ObjectUri;
if (_objectIdentity.EnvoySink != null)
{