IClientChannelSinkProvider.CreateSink(IChannelSender, String, Object) Método

Definición

Crea una cadena de receptores.

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 el que se va a construir la cadena de receptores actual.

url
String

Dirección URL del objeto con el que se va a establecer la conexión. Este parámetro puede ser null si la conexión se basa íntegramente en la información que contiene el parámetro remoteChannelData.

remoteChannelData
Object

Objeto de datos de canal que describe un canal del servidor remoto.

Devoluciones

IClientChannelSink

El primer receptor de la cadena de receptores de canal recién formado o null, que indica que este proveedor no proporcionará o no proporciona ninguna conexión de este extremo.

Atributos

Excepciones

El llamador inmediato no tiene permisos de infraestructura.

Ejemplos

En el ejemplo de código siguiente se muestra una implementación de este 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) );
}

Comentarios

Cuando se llama al CreateSink método , crea su propio receptor de canal, reenvía la CreateSink llamada al siguiente proveedor receptor de la cadena (si hay alguna) y garantiza que el siguiente receptor y el actual están vinculados juntos.

Se aplica a