Esempio n. 1
0
        public IMessageSink GetObjectSink(MarshalByRefObject obj, IMessageSink nextSink)
        {
            //var dd = ((System.Runtime.Remoting.Proxies.RemotingProxy)(((System.Runtime.Remoting.Proxies.__TransparentProxy)(((System.Runtime.Remoting.Proxies.__TransparentProxy)(obj))))._rp)).TypeName;
            RealProxy proxy = RemotingServices.GetRealProxy(obj);
            var       type  = proxy.InvokeByName <Type>("GetProxiedType");

            return(new InterceptSink(nextSink, type));
        }