本文整理汇总了C#中IServerChannelSinkProvider.CreateSink方法的典型用法代码示例。如果您正苦于以下问题:C# IServerChannelSinkProvider.CreateSink方法的具体用法?C# IServerChannelSinkProvider.CreateSink怎么用?C# IServerChannelSinkProvider.CreateSink使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IServerChannelSinkProvider
的用法示例。
在下文中一共展示了IServerChannelSinkProvider.CreateSink方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateServerChannelSinkChain
[System.Security.SecurityCritical] // auto-generated_required
public static IServerChannelSink CreateServerChannelSinkChain(
IServerChannelSinkProvider provider, IChannelReceiver channel)
{
if (provider == null)
return new DispatchChannelSink();
// add dispatch provider to end (first find last provider)
IServerChannelSinkProvider lastProvider = provider;
while (lastProvider.Next != null)
lastProvider = lastProvider.Next;
lastProvider.Next = new DispatchChannelSinkProvider();
IServerChannelSink sinkChain = provider.CreateSink(channel);
// remove dispatch provider from end
lastProvider.Next = null;
return sinkChain;
} // CreateServerChannelSinkChain
示例2: CreateServerChannelSinkChain
public static IServerChannelSink CreateServerChannelSinkChain (
IServerChannelSinkProvider provider, IChannelReceiver channel)
{
IServerChannelSinkProvider tmp = provider;
while (tmp.Next != null) tmp = tmp.Next;
tmp.Next = new ServerDispatchSinkProvider ();
// Every provider has to call CreateSink() of its next provider
return provider.CreateSink (channel);
}
示例3: CreateServerChannelSinkChain
public static IServerChannelSink CreateServerChannelSinkChain(IServerChannelSinkProvider provider, IChannelReceiver channel)
{
if (provider == null)
{
return new DispatchChannelSink();
}
IServerChannelSinkProvider next = provider;
while (next.Next != null)
{
next = next.Next;
}
next.Next = new DispatchChannelSinkProvider();
IServerChannelSink sink = provider.CreateSink(channel);
next.Next = null;
return sink;
}