IServerChannelSinkProvider.CreateSink(IChannelReceiver) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
创建接收器链。
public:
System::Runtime::Remoting::Channels::IServerChannelSink ^ CreateSink(System::Runtime::Remoting::Channels::IChannelReceiver ^ channel);
public System.Runtime.Remoting.Channels.IServerChannelSink CreateSink (System.Runtime.Remoting.Channels.IChannelReceiver channel);
[System.Security.SecurityCritical]
public System.Runtime.Remoting.Channels.IServerChannelSink CreateSink (System.Runtime.Remoting.Channels.IChannelReceiver channel);
abstract member CreateSink : System.Runtime.Remoting.Channels.IChannelReceiver -> System.Runtime.Remoting.Channels.IServerChannelSink
[<System.Security.SecurityCritical>]
abstract member CreateSink : System.Runtime.Remoting.Channels.IChannelReceiver -> System.Runtime.Remoting.Channels.IServerChannelSink
Public Function CreateSink (channel As IChannelReceiver) As IServerChannelSink
参数
- channel
- IChannelReceiver
要为其创建信道接收器链的信道。
返回
新生成的信道接收器链中的第一个接收器,或 null
(指示此提供程序将不会或不能为此终结点提供连接)。
- 属性
例外
直接调用方没有基础结构权限。
示例
IServerChannelSink^ nextSink = nullptr;
if ( nextProvider != nullptr )
{
Console::WriteLine( "The next server provider is:{0}", nextProvider );
// Create a sink chain calling the 'SaopServerFormatterProvider'
// 'CreateSink' method.
nextSink = nextProvider->CreateSink( channel );
}
return gcnew MyServerChannelSink( nextSink );
IServerChannelSink nextSink = null;
if (nextProvider != null)
{
Console.WriteLine("The next server provider is:"
+nextProvider);
// Create a sink chain calling the 'SaopServerFormatterProvider'
// 'CreateSink' method.
nextSink = nextProvider.CreateSink(channel);
}
return new MyServerChannelSink(nextSink);
Dim nextSink As IServerChannelSink = Nothing
If Not (nextProvider Is Nothing) Then
Console.WriteLine("The next server provider is:" + CType(nextProvider,Object).ToString())
' Create a sink chain calling the 'SaopServerFormatterProvider'
' 'CreateSink' method.
nextSink = nextProvider.CreateSink(channel)
End If
Return New MyServerChannelSink(nextSink)