Share via


ChannelServices.UnregisterChannel(IChannel) Metodo

Definizione

Annulla la registrazione di un determinato canale dall'elenco dei canali registrati.

public:
 static void UnregisterChannel(System::Runtime::Remoting::Channels::IChannel ^ chnl);
public static void UnregisterChannel (System.Runtime.Remoting.Channels.IChannel chnl);
static member UnregisterChannel : System.Runtime.Remoting.Channels.IChannel -> unit
Public Shared Sub UnregisterChannel (chnl As IChannel)

Parametri

chnl
IChannel

Canale di cui annullare la registrazione.

Eccezioni

Il valore del parametro chnl è null.

Il canale non è registrato.

Almeno uno dei chiamanti in posizione più elevata nello stack di chiamate non dispone delle autorizzazioni alla configurazione di canali e tipi remoti.

Esempio

System::Console::WriteLine( "Hit <enter> to unregister the channels..." );
System::Console::ReadLine();

// Unregister the 'HttpChannel' and 'TcpChannel' channels.
ChannelServices::UnregisterChannel( myTcpChannel );
ChannelServices::UnregisterChannel( myHttpChannel );
Console::WriteLine( "Unregistered the channels." );
System.Console.WriteLine("Hit <enter> to unregister the channels...");
System.Console.ReadLine();
// Unregister the 'HttpChannel' and 'TcpChannel' channels.
ChannelServices.UnregisterChannel(myTcpChannel);
ChannelServices.UnregisterChannel(myHttpChannel);
Console.WriteLine("Unregistered the channels.");
System.Console.WriteLine("Hit <enter> to unregister the channels...")
System.Console.ReadLine()
' Unregister the 'HttpChannel' and 'TcpChannel' channels.
ChannelServices.UnregisterChannel(myTcpChannel)
ChannelServices.UnregisterChannel(myHttpChannel)
Console.WriteLine("Unregistered the channels.")

Si applica a