Inheritance: IMessageSink
        public virtual IMessageCtrl AsyncProcessMessage(IMessage reqMsg, IMessageSink replySink)
        {
            IMessageCtrl       ctrl = null;
            MarshalByRefObject obj2;
            IDisposable        disposable;
            IMessage           msg = InternalSink.ValidateMessage(reqMsg);

            if (msg == null)
            {
                msg = InternalSink.DisallowAsyncActivation(reqMsg);
            }
            if (msg != null)
            {
                if (replySink != null)
                {
                    replySink.SyncProcessMessage(msg);
                }
                return(ctrl);
            }
            IMessageSink objectChain = this.GetObjectChain(reqMsg, out obj2);

            if ((obj2 != null) && ((disposable = obj2 as IDisposable) != null))
            {
                DisposeSink sink2 = new DisposeSink(disposable, replySink);
                replySink = sink2;
            }
            return(objectChain.AsyncProcessMessage(reqMsg, replySink));
        }
Exemplo n.º 2
0
        public virtual IMessageCtrl AsyncProcessMessage(IMessage reqMsg, IMessageSink replySink)
        {
            IMessageCtrl result  = null;
            IMessage     message = InternalSink.ValidateMessage(reqMsg);

            if (message == null)
            {
                message = InternalSink.DisallowAsyncActivation(reqMsg);
            }
            if (message != null)
            {
                if (replySink != null)
                {
                    replySink.SyncProcessMessage(message);
                }
            }
            else
            {
                MarshalByRefObject marshalByRefObject;
                IMessageSink       objectChain = this.GetObjectChain(reqMsg, out marshalByRefObject);
                IDisposable        iDis;
                if (marshalByRefObject != null && (iDis = (marshalByRefObject as IDisposable)) != null)
                {
                    DisposeSink disposeSink = new DisposeSink(iDis, replySink);
                    replySink = disposeSink;
                }
                result = objectChain.AsyncProcessMessage(reqMsg, replySink);
            }
            return(result);
        }
        [System.Security.SecurityCritical]  // auto-generated
        public virtual IMessageCtrl AsyncProcessMessage(IMessage reqMsg, IMessageSink replySink)
        {
            Message.DebugOut("+++++++++++++++++++++++++ SrvCtxTerminator: SyncProcessMsg");
            IMessageCtrl msgCtrl = null;
            IMessage     errMsg  = ValidateMessage(reqMsg);

            if (errMsg == null)
            {
                errMsg = DisallowAsyncActivation(reqMsg);
            }

            if (errMsg != null)
            {
                if (replySink != null)
                {
                    replySink.SyncProcessMessage(errMsg);
                }
            }
            else
            {
                // <
                MarshalByRefObject obj;
                IMessageSink       nextChain = GetObjectChain(reqMsg, out obj);
                IDisposable        iDis;
                if (obj != null && ((iDis = (obj as IDisposable)) != null))
                {
                    DisposeSink dsink = new DisposeSink(iDis, replySink);
                    replySink = dsink;
                }
                msgCtrl = nextChain.AsyncProcessMessage(
                    reqMsg,
                    replySink);
            }
            return(msgCtrl);
        }
 public virtual IMessageCtrl AsyncProcessMessage(IMessage reqMsg, IMessageSink replySink)
 {
     IMessageCtrl ctrl = null;
     MarshalByRefObject obj2;
     IDisposable disposable;
     IMessage msg = InternalSink.ValidateMessage(reqMsg);
     if (msg == null)
     {
         msg = InternalSink.DisallowAsyncActivation(reqMsg);
     }
     if (msg != null)
     {
         if (replySink != null)
         {
             replySink.SyncProcessMessage(msg);
         }
         return ctrl;
     }
     IMessageSink objectChain = this.GetObjectChain(reqMsg, out obj2);
     if ((obj2 != null) && ((disposable = obj2 as IDisposable) != null))
     {
         DisposeSink sink2 = new DisposeSink(disposable, replySink);
         replySink = sink2;
     }
     return objectChain.AsyncProcessMessage(reqMsg, replySink);
 }
Exemplo n.º 5
0
        public virtual IMessageCtrl AsyncProcessMessage(IMessage reqMsg, IMessageSink replySink) 
        {
            Message.DebugOut("+++++++++++++++++++++++++ SrvCtxTerminator: SyncProcessMsg");
            IMessageCtrl msgCtrl=null;
            IMessage errMsg = ValidateMessage(reqMsg);

            if (errMsg == null)
            {
                errMsg = DisallowAsyncActivation(reqMsg);
            }

            if (errMsg != null)
            {
                if (replySink!=null)
                {
                    replySink.SyncProcessMessage(errMsg);
                }
            }
            else
            {
                MarshalByRefObject obj;
                IMessageSink nextChain = GetObjectChain(reqMsg, out obj);
                IDisposable iDis;
                if (obj != null && ((iDis = (obj as IDisposable)) != null))
                {
                    DisposeSink dsink = new DisposeSink(iDis, replySink); 
                    replySink = dsink;
                }
                msgCtrl = nextChain.AsyncProcessMessage(
                                reqMsg, 
                                replySink);
                
            }
            return msgCtrl;
        }