Partilhar via


IServerChannelSinkProvider.CreateSink(IChannelReceiver) Método

Definição

Cria uma cadeia de coletores.

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

Parâmetros

channel
IChannelReceiver

O canal para o qual criar a cadeia de coletores de canal.

Retornos

IServerChannelSink

O primeiro coletor da cadeia de coletores de canal recém-criada ou null, que indica que esse provedor não fornecerá ou não poderá fornecer uma conexão para este ponto de extremidade.

Atributos

Exceções

O chamador imediato não tem permissão de infraestrutura.

Exemplos

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)

Aplica-se a