ChannelServices.RegisteredChannels 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取当前已注册信道的列表。
public:
static property cli::array <System::Runtime::Remoting::Channels::IChannel ^> ^ RegisteredChannels { cli::array <System::Runtime::Remoting::Channels::IChannel ^> ^ get(); };
public static System.Runtime.Remoting.Channels.IChannel[] RegisteredChannels { get; }
public static System.Runtime.Remoting.Channels.IChannel[] RegisteredChannels { [System.Security.SecurityCritical] get; }
static member RegisteredChannels : System.Runtime.Remoting.Channels.IChannel[]
[<get: System.Security.SecurityCritical>]
static member RegisteredChannels : System.Runtime.Remoting.Channels.IChannel[]
Public Shared ReadOnly Property RegisteredChannels As IChannel()
属性值
IChannel[]
所有当前注册信道的数组。
- 属性
例外
直接调用方没有基础结构权限。
示例
// 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 );
}
// Retrieve and print information about the registered channels.
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);
}
' Retrieve and print information about the registered channels.
Dim myIChannelArray As IChannel() = ChannelServices.RegisteredChannels
Dim i As Integer
For i = 0 To myIChannelArray.Length - 1
Console.WriteLine("Name of Channel: {0}", myIChannelArray(i).ChannelName)
Console.WriteLine("Priority of Channel: {0}", + myIChannelArray(i).ChannelPriority)
Next i