Exemplo n.º 1
0
        public virtual void GetObjectData(Object obj, SerializationInfo info, StreamingContext context)
        {
            if (obj == null)
            {
                throw new ArgumentNullException("obj");
            }

            if (info == null)
            {
                throw new ArgumentNullException("info");
            }

            //
            // This code is to special case marshalling types inheriting from RemotingClientProxy
            // Check whether type inherits from RemotingClientProxy and serialize the correct ObjRef
            // after getting the correct proxy to the actual server object
            //

            Message.DebugOut("RemotingSurrogate::GetObjectData obj.Type: " + obj.GetType().FullName + " \n");
            if (RemotingServices.IsTransparentProxy(obj))
            {
                RealProxy rp = RemotingServices.GetRealProxy(obj);
                rp.GetObjectData(info, context);
            }
            else
            {
                RemotingServices.GetObjectData(obj, info, context);
            }
        }
Exemplo n.º 2
0
 public virtual void GetObjectData(object obj, SerializationInfo si, StreamingContext sc)
 {
     if (obj == null || si == null)
     {
         throw new ArgumentNullException();
     }
     if (RemotingServices.IsTransparentProxy(obj))
     {
         RealProxy realProxy = RemotingServices.GetRealProxy(obj);
         realProxy.GetObjectData(si, sc);
     }
     else
     {
         RemotingServices.GetObjectData(obj, si, sc);
     }
 }
Exemplo n.º 3
0
        public virtual void GetObjectData(Object obj, SerializationInfo si, StreamingContext sc)
        {
            if (null == obj || null == si)
            {
                throw new ArgumentNullException();
            }
#if !DISABLE_REMOTING
            if (RemotingServices.IsTransparentProxy(obj))
            {
                RealProxy rp = RemotingServices.GetRealProxy(obj);
                rp.GetObjectData(si, sc);
            }
            else
            {
                RemotingServices.GetObjectData(obj, si, sc);
            }
#endif
        }
Exemplo n.º 4
0
 public virtual void GetObjectData(object obj, SerializationInfo info, StreamingContext context)
 {
     if (obj == null)
     {
         throw new ArgumentNullException("obj");
     }
     if (info == null)
     {
         throw new ArgumentNullException("info");
     }
     if (RemotingServices.IsTransparentProxy(obj))
     {
         RealProxy realProxy = RemotingServices.GetRealProxy(obj);
         realProxy.GetObjectData(info, context);
         return;
     }
     RemotingServices.GetObjectData(obj, info, context);
 }