ChannelServices.UnregisterChannel(IChannel) Метод

Определение

Отменяет регистрацию указанного канала в списке зарегистрированных каналов.

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)

Параметры

chnl
IChannel

Канал, регистрация которого отменяется.

Исключения

Параметр chnl имеет значение null.

Канал не зарегистрирован.

По крайней мере у одного из вызывающих операторов, находящихся в верхней части стека вызовов, отсутствует разрешение на настройку типов и каналов удаленного взаимодействия.

Примеры

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

Применяется к