コード例 #1
0
        public override IMessageCtrl AsyncObjectProcessMessage(IMessage msg, IMessageSink replySink)
        {
            MarshalByRefObject marshalByRefObject = (MarshalByRefObject)Activator.CreateInstance(this._objectType, true);
            IMessageSink       messageSink        = this._context.CreateServerObjectSinkChain(marshalByRefObject, false);

            if (marshalByRefObject is IDisposable)
            {
                replySink = new DisposerReplySink(replySink, (IDisposable)marshalByRefObject);
            }
            return(messageSink.AsyncProcessMessage(msg, replySink));
        }
コード例 #2
0
        public override IMessageCtrl AsyncObjectProcessMessage(IMessage msg, IMessageSink replySink)
        {
            MarshalByRefObject obj        = (MarshalByRefObject)Activator.CreateInstance(_objectType, true);
            IMessageSink       serverSink = _context.CreateServerObjectSinkChain(obj, false);

            if (obj is IDisposable)
            {
                replySink = new DisposerReplySink(replySink, ((IDisposable)obj));
            }
            return(serverSink.AsyncProcessMessage(msg, replySink));
        }
コード例 #3
0
		public override IMessageCtrl AsyncObjectProcessMessage (IMessage msg, IMessageSink replySink)
		{
			MarshalByRefObject obj = (MarshalByRefObject)Activator.CreateInstance (_objectType, true);
			IMessageSink serverSink = _context.CreateServerObjectSinkChain (obj, false);
			if (obj is IDisposable) replySink = new DisposerReplySink(replySink, ((IDisposable)obj));
			return serverSink.AsyncProcessMessage (msg, replySink);
		}