当前位置: 首页>>代码示例>>C#>>正文


C# IMessageSink.SyncProcessMessage方法代码示例

本文整理汇总了C#中IMessageSink.SyncProcessMessage方法的典型用法代码示例。如果您正苦于以下问题:C# IMessageSink.SyncProcessMessage方法的具体用法?C# IMessageSink.SyncProcessMessage怎么用?C# IMessageSink.SyncProcessMessage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IMessageSink的用法示例。


在下文中一共展示了IMessageSink.SyncProcessMessage方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: AsyncProcessMessage

 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);
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:26,代码来源:ServerContextTerminatorSink.cs

示例2: SyncProcessMessage

 public virtual IMessage SyncProcessMessage(object o, IMessageSink sink, IMessage msg)
 {
     Begin(o, msg);
     IMethodReturnMessage returnedMessage = (IMethodReturnMessage)sink.SyncProcessMessage(msg);
     if (returnedMessage.Exception != null)
         End(o, msg);
     return returnedMessage;
 }
开发者ID:liaoyu45,项目名称:LYCodes,代码行数:8,代码来源:AOPBaseController.cs

示例3: SyncProcessMessage

        public virtual IMessage SyncProcessMessage(IMessageSink sink, IMessage msg)
        {
            AOPControllerInfo cInfo = AOPConfig.GetAssoc(this.GetType());
            if (cInfo != null && cInfo.Controller != null)
            {
                return cInfo.Controller.SyncProcessMessage(this, sink, msg);
            }

            return sink.SyncProcessMessage(msg);
        }
开发者ID:jodli,项目名称:AOP,代码行数:10,代码来源:AOPBaseClass.cs

示例4: AsyncProcessMessage

 public virtual IMessageCtrl AsyncProcessMessage(IMessage msg, IMessageSink replySink)
 {
     IMessage message = null;
     message = this.SyncProcessMessage(msg);
     if (replySink != null)
     {
         replySink.SyncProcessMessage(message);
     }
     return null;
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:10,代码来源:ComRedirectionProxy.cs

示例5: SyncProcessMessage

        public virtual IMessage SyncProcessMessage(IMessageSink sink, IMessage msg)
        {
            AOPControllerInfo cinfo = AOPConfig.GetAssoc(GetType());
            if (cinfo != null && cinfo.controller != null)
            {
                if (cinfo.matcher.IsMatch(msg))
                    return cinfo.controller.SyncProcessMessage(this, sink, msg);
            }

            return sink.SyncProcessMessage(msg);
        }
开发者ID:liaoyu45,项目名称:LYCodes,代码行数:11,代码来源:AOPBaseClass.cs

示例6: SyncProcessMessage

		public virtual IMessage SyncProcessMessage(IMessageSink sink, IMessage msg)
		{
			AspectControllerInfo cinfo = AspectConfiguration.Instance.GetAssociation(GetType());
			if ((cinfo != null) && (cinfo.Controller != null))
			{
				if ((cinfo.Matcher == null) || cinfo.Matcher.IsMatch(msg))
				{
					return cinfo.Controller.SyncProcessMessage(this, sink, msg);
				}
			}

			return sink.SyncProcessMessage(msg);
		}
开发者ID:treytomes,项目名称:ILExperiments,代码行数:13,代码来源:AspectOrientedObject.cs

示例7: AsyncProcessMessage

 public virtual IMessageCtrl AsyncProcessMessage(IMessage reqMsg, IMessageSink replySink)
 {
     IMessageCtrl ctrl = null;
     IMessage msg = InternalSink.ValidateMessage(reqMsg);
     if (msg != null)
     {
         if (replySink != null)
         {
             replySink.SyncProcessMessage(msg);
         }
         return ctrl;
     }
     return Thread.CurrentContext.GetClientContextChain().AsyncProcessMessage(reqMsg, replySink);
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:14,代码来源:EnvoyTerminatorSink.cs

示例8: SyncProcessMessage

 public virtual IMessage SyncProcessMessage(Object o, IMessageSink sink, IMessage msg)
 {
     this.Begin(o, msg);
     IMethodReturnMessage retMsg = (IMethodReturnMessage)sink.SyncProcessMessage(msg);
     if (retMsg.Exception == null)
     {
         this.End(o, msg);
     }
     else
     {
         this.Error(o, msg);
     }
     return retMsg;
 }
开发者ID:jodli,项目名称:AOP,代码行数:14,代码来源:AOPBaseController.cs

示例9: AsyncProcessMessage

        [System.Security.SecurityCritical]  // auto-generated 
        public virtual IMessageCtrl AsyncProcessMessage(IMessage msg, IMessageSink replySink)
        {
            // <
 

 
            IMessage replyMsg = null; 

            replyMsg = SyncProcessMessage(msg); 

            if (replySink != null)
                replySink.SyncProcessMessage(replyMsg);
 
            return null;
        } // AsyncProcessMessage 
开发者ID:sjyanxin,项目名称:WPFSource,代码行数:16,代码来源:RedirectionProxy.cs

示例10: AsyncProcessMessage

 public virtual IMessageCtrl AsyncProcessMessage(IMessage reqMsg, IMessageSink replySink)
 {
     IMessage msg = InternalSink.ValidateMessage(reqMsg);
     object[] args = new object[4];
     IMessageCtrl ctrl = null;
     if (msg != null)
     {
         if (replySink != null)
         {
             replySink.SyncProcessMessage(msg);
         }
         return ctrl;
     }
     ServerIdentity serverIdentity = InternalSink.GetServerIdentity(reqMsg);
     if (RemotingServices.CORProfilerTrackRemotingAsync())
     {
         Guid empty = Guid.Empty;
         if (RemotingServices.CORProfilerTrackRemotingCookie())
         {
             object obj2 = reqMsg.Properties["CORProfilerCookie"];
             if (obj2 != null)
             {
                 empty = (Guid) obj2;
             }
         }
         RemotingServices.CORProfilerRemotingServerReceivingMessage(empty, true);
         if (replySink != null)
         {
             IMessageSink sink = new ServerAsyncReplyTerminatorSink(replySink);
             replySink = sink;
         }
     }
     Context serverContext = serverIdentity.ServerContext;
     if (serverContext.IsThreadPoolAware)
     {
         args[0] = reqMsg;
         args[1] = replySink;
         args[2] = Thread.CurrentContext;
         args[3] = serverContext;
         InternalCrossContextDelegate ftnToCall = new InternalCrossContextDelegate(CrossContextChannel.AsyncProcessMessageCallback);
         return (IMessageCtrl) Thread.CurrentThread.InternalCrossContextCallback(serverContext, ftnToCall, args);
     }
     AsyncWorkItem item = null;
     item = new AsyncWorkItem(reqMsg, replySink, Thread.CurrentContext, serverIdentity);
     WaitCallback callBack = new WaitCallback(item.FinishAsyncWork);
     ThreadPool.QueueUserWorkItem(callBack);
     return ctrl;
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:48,代码来源:CrossContextChannel.cs

示例11: SyncProcessMessage

		public virtual IMessage SyncProcessMessage(object o, IMessageSink sink, IMessage msg)
		{
			Begin(o, msg);
			IMethodReturnMessage returnedMessage = (IMethodReturnMessage)sink.SyncProcessMessage(msg);
			if (returnedMessage.Exception != null)
			{
				if (Error(returnedMessage.Exception, o, msg))
				{
					returnedMessage = new MethodReturnMessageWrapper(returnedMessage)
					{
						Exception = null
					};
				}
			}
			End(o, msg);
			return returnedMessage;
		}
开发者ID:treytomes,项目名称:ILExperiments,代码行数:17,代码来源:AspectBase.cs

示例12: AsyncProcessMessage

 public virtual IMessageCtrl AsyncProcessMessage(IMessage reqMsg, IMessageSink replySink)
 {
     IMessageCtrl ctrl = null;
     IMessage msg = InternalSink.ValidateMessage(reqMsg);
     if (msg != null)
     {
         if (replySink != null)
         {
             replySink.SyncProcessMessage(msg);
         }
         return ctrl;
     }
     IMessageSink serverObject = this._stackBuilderSink.ServerObject as IMessageSink;
     if (serverObject != null)
     {
         return serverObject.AsyncProcessMessage(reqMsg, replySink);
     }
     return this._stackBuilderSink.AsyncProcessMessage(reqMsg, replySink);
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:19,代码来源:ServerObjectTerminatorSink.cs

示例13: AsyncProcessMessage

 public IMessageCtrl AsyncProcessMessage(IMessage msg, IMessageSink replySink)
 {
     IMethodCallMessage mcm = (IMethodCallMessage) msg;
     try
     {
         ITransportHeaders headers;
         Stream stream;
         this.SerializeMessage(mcm, out headers, out stream);
         ClientChannelSinkStack sinkStack = new ClientChannelSinkStack(replySink);
         sinkStack.Push(this, mcm);
         this._nextSink.AsyncProcessRequest(sinkStack, msg, headers, stream);
     }
     catch (Exception exception)
     {
         IMessage message2 = new ReturnMessage(exception, mcm);
         if (replySink != null)
         {
             replySink.SyncProcessMessage(message2);
         }
     }
     return null;
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:22,代码来源:SoapClientFormatterSink.cs

示例14: AsyncDispatchMessage

 public static IMessageCtrl AsyncDispatchMessage(IMessage msg, IMessageSink replySink)
 {
     IMessageCtrl ctrl = null;
     try
     {
         if (msg == null)
         {
             throw new ArgumentNullException("msg");
         }
         IncrementRemoteCalls();
         if (!(msg is TransitionCall))
         {
             CheckDisconnectedOrCreateWellKnownObject(msg);
         }
         ctrl = GetCrossContextChannelSink().AsyncProcessMessage(msg, replySink);
     }
     catch (Exception exception)
     {
         if (replySink == null)
         {
             return ctrl;
         }
         try
         {
             IMethodCallMessage message = (IMethodCallMessage) msg;
             ReturnMessage message2 = new ReturnMessage(exception, (IMethodCallMessage) msg);
             if (msg != null)
             {
                 message2.SetLogicalCallContext(message.LogicalCallContext);
             }
             replySink.SyncProcessMessage(message2);
         }
         catch (Exception)
         {
         }
     }
     return ctrl;
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:38,代码来源:ChannelServices.cs

示例15: CallProcessMessage

 internal static IMessage CallProcessMessage(IMessageSink ms, IMessage reqMsg, ArrayWithSize proxySinks, Thread currentThread, Context currentContext, bool bSkippingContextChain)
 {
     if (proxySinks != null)
     {
         DynamicPropertyHolder.NotifyDynamicSinks(reqMsg, proxySinks, true, true, false);
     }
     bool flag = false;
     if (bSkippingContextChain)
     {
         flag = currentContext.NotifyDynamicSinks(reqMsg, true, true, false, true);
         ChannelServices.NotifyProfiler(reqMsg, RemotingProfilerEvent.ClientSend);
     }
     if (ms == null)
     {
         throw new RemotingException(Environment.GetResourceString("Remoting_Proxy_NoChannelSink"));
     }
     IMessage msg = ms.SyncProcessMessage(reqMsg);
     if (bSkippingContextChain)
     {
         ChannelServices.NotifyProfiler(msg, RemotingProfilerEvent.ClientReceive);
         if (flag)
         {
             currentContext.NotifyDynamicSinks(msg, true, false, false, true);
         }
     }
     IMethodReturnMessage message2 = msg as IMethodReturnMessage;
     if ((msg == null) || (message2 == null))
     {
         throw new RemotingException(Environment.GetResourceString("Remoting_Message_BadType"));
     }
     if (proxySinks != null)
     {
         DynamicPropertyHolder.NotifyDynamicSinks(msg, proxySinks, true, false, false);
     }
     return msg;
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:36,代码来源:RemotingProxy.cs


注:本文中的IMessageSink.SyncProcessMessage方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。