共用方式為


IServerChannelSinkProvider.CreateSink(IChannelReceiver) 方法

定義

建立接收鏈結。

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)

適用於