ChannelServices.UnregisterChannel(IChannel) Método

Definição

Cancela o registro de um canal específico da lista de canais registrados.

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)

Parâmetros

chnl
IChannel

O canal cujo registro será cancelado.

Exceções

O parâmetro chnl é null.

O canal não está registrado.

Pelo menos um dos chamadores no topo da pilha de chamadas não tem permissão para configurar canais e tipos de comunicação remota.

Exemplos

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.")

Aplica-se a