IClientChannelSinkProvider.CreateSink(IChannelSender, String, Object) Método
Definição
Importante
Algumas informações dizem respeito a um produto pré-lançado que pode ser substancialmente modificado antes de ser lançado. A Microsoft não faz garantias, de forma expressa ou implícita, em relação à informação aqui apresentada.
Cria uma corrente de pia.
public:
System::Runtime::Remoting::Channels::IClientChannelSink ^ CreateSink(System::Runtime::Remoting::Channels::IChannelSender ^ channel, System::String ^ url, System::Object ^ remoteChannelData);
public System.Runtime.Remoting.Channels.IClientChannelSink CreateSink(System.Runtime.Remoting.Channels.IChannelSender channel, string url, object remoteChannelData);
[System.Security.SecurityCritical]
public System.Runtime.Remoting.Channels.IClientChannelSink CreateSink(System.Runtime.Remoting.Channels.IChannelSender channel, string url, object remoteChannelData);
abstract member CreateSink : System.Runtime.Remoting.Channels.IChannelSender * string * obj -> System.Runtime.Remoting.Channels.IClientChannelSink
[<System.Security.SecurityCritical>]
abstract member CreateSink : System.Runtime.Remoting.Channels.IChannelSender * string * obj -> System.Runtime.Remoting.Channels.IClientChannelSink
Public Function CreateSink (channel As IChannelSender, url As String, remoteChannelData As Object) As IClientChannelSink
Parâmetros
- channel
- IChannelSender
Canal para o qual está a ser construída a cadeia de sumidouro de corrente.
- url
- String
A URL do objeto a que se deve ligar. Este parâmetro pode ser null se a ligação for baseada inteiramente na informação contida no remoteChannelData parâmetro.
- remoteChannelData
- Object
Um objeto de dados de canal que descreve um canal no servidor remoto.
Devoluções
O primeiro sumidouro da nova cadeia de sumidouros de canal formada, ou null, que indica que este fornecedor não irá ou não pode fornecer uma ligação para este endpoint.
- Atributos
Exceções
O interlocutor imediato não tem autorização para infraestruturas.
Exemplos
O exemplo de código seguinte ilustra uma implementação deste método.
virtual IClientChannelSink^ CreateSink( IChannelSender^ channel, String^ url, Object^ remoteChannelData )
{
Console::WriteLine( "Creating ClientSink for {0}", url );
// Create the next sink in the chain.
IClientChannelSink^ nextSink = nextProvider->CreateSink( channel, url, remoteChannelData );
// Hook our sink up to it.
return (gcnew ClientSink( nextSink ));
}
public IClientChannelSink CreateSink (IChannelSender channel, String url, Object remoteChannelData)
{
Console.WriteLine("Creating ClientSink for {0}", url);
// Create the next sink in the chain.
IClientChannelSink nextSink = nextProvider.CreateSink(channel, url, remoteChannelData);
// Hook our sink up to it.
return( new ClientSink(nextSink) );
}
Observações
Quando o CreateSink método é chamado, cria o seu próprio dissipador de canal, encaminha a CreateSink chamada para o próximo fornecedor do sumidouro na cadeia (se existir) e assegura que o próximo sumidouro e o atual estão ligados.