System.Runtime.Remoting.RemotingServices.GetRealProxy C# (CSharp) Méthode

GetRealProxy() private méthode

private GetRealProxy ( Object proxy ) : RealProxy
proxy Object
Résultat System.Runtime.Remoting.Proxies.RealProxy
        public static extern RealProxy GetRealProxy(Object proxy);

Usage Example

Exemple #1
0
        } // ObjectMode

        public virtual IMessage SyncProcessMessage(IMessage msg)
        {
            IMessage replyMsg = null;

            try
            {
                msg.Properties["__Uri"] = _realProxy.IdentityObject.URI;

                if (_objectMode == WellKnownObjectMode.Singleton)
                {
                    replyMsg = _realProxy.Invoke(msg);
                }
                else
                {
                    // This is a single call object, so we need to create
                    // a new instance.
                    MarshalByRefObject obj = (MarshalByRefObject)Activator.CreateInstance(_serverType, true);
                    BCLDebug.Assert(RemotingServices.IsTransparentProxy(obj), "expecting a proxy");

                    RealProxy rp = RemotingServices.GetRealProxy(obj);
                    replyMsg = rp.Invoke(msg);
                }
            }
            catch (Exception e)
            {
                replyMsg = new ReturnMessage(e, msg as IMethodCallMessage);
            }

            return(replyMsg);
        } // SyncProcessMessage
All Usage Examples Of System.Runtime.Remoting.RemotingServices::GetRealProxy
RemotingServices