本文整理汇总了C#中System.Runtime.Remoting.Contexts.Context.NotifyDynamicSinks方法的典型用法代码示例。如果您正苦于以下问题:C# Context.NotifyDynamicSinks方法的具体用法?C# Context.NotifyDynamicSinks怎么用?C# Context.NotifyDynamicSinks使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Runtime.Remoting.Contexts.Context
的用法示例。
在下文中一共展示了Context.NotifyDynamicSinks方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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;
}
示例2: CallProcessMessage
// This is used when a TP is called with SyncProcessMessage
internal static IMessage CallProcessMessage(IMessageSink ms,
IMessage reqMsg,
ArrayWithSize proxySinks,
Thread currentThread,
Context currentContext,
bool bSkippingContextChain)
{
// Notify Dynamic Sinks: CALL starting
if (proxySinks != null)
{
DynamicPropertyHolder.NotifyDynamicSinks(
reqMsg,
proxySinks,
true, // bCliSide
true, // bStart
false); // bAsync
}
RemotingServices.LogRemotingStage(RemotingServices.CLIENT_MSG_SINK_CHAIN);
bool bHasDynamicSinks = false;
if (bSkippingContextChain)
{
// this would have been done in the client context terminator sink
bHasDynamicSinks =
currentContext.NotifyDynamicSinks(reqMsg,
true, // bCliSide
true, // bStart
false, // bAsync
true); // bNotifyGlobals
ChannelServices.NotifyProfiler(reqMsg, RemotingProfilerEvent.ClientSend);
}
if (ms == null)
{
throw new RemotingException(
Environment.GetResourceString(
"Remoting_Proxy_NoChannelSink"));
}
IMessage retMsg = ms.SyncProcessMessage(reqMsg);
if (bSkippingContextChain)
{
// this would have been done in the client context terminator sink
ChannelServices.NotifyProfiler(retMsg, RemotingProfilerEvent.ClientReceive);
if (bHasDynamicSinks)
{
currentContext.NotifyDynamicSinks(
retMsg,
true, // bCliSide
false, // bStart
false, // bAsync
true); // bNotifyGlobals
}
}
IMethodReturnMessage mrm = retMsg as IMethodReturnMessage;
if (retMsg == null || mrm == null)
{
throw new RemotingException(
Environment.GetResourceString("Remoting_Message_BadType"));
}
// notify DynamicSinks: CALL returned
if (proxySinks != null)
{
DynamicPropertyHolder.NotifyDynamicSinks(
retMsg,
proxySinks,
true, // bCliSide
false, // bStart
false); // bAsync
}
RemotingServices.LogRemotingStage(RemotingServices.CLIENT_RET_PROPAGATION);
return retMsg;
}