/// <summary>Asynchronously dispatches the given message to the server-side chain(s) based on the URI embedded in the message.</summary>
        /// <returns>A <see cref="T:System.Runtime.Remoting.Messaging.IMessageCtrl" /> object used to control the asynchronously dispatched message.</returns>
        /// <param name="msg">The message to dispatch. </param>
        /// <param name="replySink">The sink that will process the return message if it is not null. </param>
        /// <exception cref="T:System.ArgumentNullException">The <paramref name="msg" /> parameter is null. </exception>
        /// <exception cref="T:System.Security.SecurityException">The immediate caller does not have infrastructure permission. </exception>
        /// <PermissionSet>
        ///   <IPermission class="System.Security.Permissions.ReflectionPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="MemberAccess" />
        ///   <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
        /// </PermissionSet>
        public static IMessageCtrl AsyncDispatchMessage(IMessage msg, IMessageSink replySink)
        {
            IMessage message = ChannelServices.CheckIncomingMessage(msg);

            if (message != null)
            {
                replySink.SyncProcessMessage(ChannelServices.CheckReturnMessage(msg, message));
                return(null);
            }
            if (RemotingConfiguration.CustomErrorsEnabled(ChannelServices.IsLocalCall(msg)))
            {
                replySink = new ExceptionFilterSink(msg, replySink);
            }
            return(ChannelServices._crossContextSink.AsyncProcessMessage(msg, replySink));
        }
Example #2
0
        public static IMessageCtrl AsyncDispatchMessage(IMessage msg, IMessageSink replySink)
        {
            IMessage ret = CheckIncomingMessage(msg);

            if (ret != null)
            {
                replySink.SyncProcessMessage(CheckReturnMessage(msg, ret));
                return(null);
            }

#if NET_1_1
            if (RemotingConfiguration.CustomErrorsEnabled(IsLocalCall(msg)))
            {
                replySink = new ExceptionFilterSink(msg, replySink);
            }
#endif

            return(_crossContextSink.AsyncProcessMessage(msg, replySink));
        }
		public static IMessageCtrl AsyncDispatchMessage (IMessage msg, IMessageSink replySink)
		{
			IMessage ret = CheckIncomingMessage (msg);
			if (ret != null) {
				replySink.SyncProcessMessage (CheckReturnMessage (msg, ret));
				return null;
			}
			
#if NET_1_1
			if (RemotingConfiguration.CustomErrorsEnabled (IsLocalCall (msg)))
				replySink = new ExceptionFilterSink (msg, replySink);
#endif
			
			return _crossContextSink.AsyncProcessMessage (msg, replySink);		
		}