IServerChannelSinkProvider.CreateSink(IChannelReceiver) Metodo

Definizione

Crea una catena di sink.

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

Parametri

channel
IChannelReceiver

Canale per il quale creare la catena di sink di canale.

Restituisce

IServerChannelSink

Primo sink della catena di sink di canale appena costituita oppure null per indicare che questo provider non fornirà o non è in grado di fornire una connessione per l'endpoint.

Attributi

Eccezioni

Il chiamante immediato non dispone dell'autorizzazione di infrastruttura.

Esempio

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)

Si applica a