IpcClientChannel.ChannelPriority 属性

定义

获取当前信道的优先级。Gets the priority of the current channel.

public:
 property int ChannelPriority { int get(); };
public int ChannelPriority { get; }
member this.ChannelPriority : int
Public ReadOnly Property ChannelPriority As Integer

属性值

Int32

一个整数,指示分配给此信道的优先级。An integer that indicates the priority assigned to the channel.

实现

示例

下面的代码示例说明如何使用 ChannelPriority 属性。The following code example shows how to use the ChannelPriority property.

// Show the priority of the channel.
Console::WriteLine( L"The priority of the channel is {0}.", clientChannel->ChannelPriority );

// Show the priority of the channel.
Console.WriteLine("The priority of the channel is {0}.",
    clientChannel.ChannelPriority);

注解

优先级控制竞争的客户端连接到给定终结点的顺序;优先级较高的通道在较低优先级通道之前连接。The priority controls the order in which competing clients connect to a given endpoint; higher priority channels connect before lower priority channels. 默认优先级为 1;允许负的优先级。The default priority is 1; negative priorities are allowed.

适用于