Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ChannelServices::RegisteredChannels Property

 

Gets a list of currently registered channels.

Namespace:   System.Runtime.Remoting.Channels
Assembly:  mscorlib (in mscorlib.dll)

public:
property array<IChannel^>^ RegisteredChannels {
	[SecurityCriticalAttribute]
	static array<IChannel^>^ get();
}

Property Value

Type: array<System.Runtime.Remoting.Channels::IChannel^>^

An array of all the currently registered channels.

Exception Condition
SecurityException

The immediate caller does not have infrastructure permission.

// Retrieve and print information about the registered channels.
array<IChannel^>^myIChannelArray = ChannelServices::RegisteredChannels;
for ( int i = 0; i < myIChannelArray->Length; i++ )
{
   Console::WriteLine( "Name of Channel: {0}", myIChannelArray[ i ]->ChannelName );
   Console::WriteLine( "Priority of Channel: {0}", myIChannelArray[ i ]->ChannelPriority );

}

SecurityPermission

For operating with infrastructure code. Demand value: SecurityAction::LinkDemand; Permission value: SecurityPermissionFlag::Infrastructure

.NET Framework
Available since 1.1
Return to top
Show:
© 2017 Microsoft