MessageQueue.Refresh 方法

定义

刷新呈现 MessageQueue 的属性以反映资源的当前状态。

public:
 void Refresh();
public void Refresh();
member this.Refresh : unit -> unit
Public Sub Refresh ()

示例

下面的代码示例演示了如何使用 Refresh


// Connect to a queue on the local computer.
MessageQueue^ queue = gcnew MessageQueue(".\\exampleQueue");

// Refresh the queue's property values to obtain its current state.
queue->Refresh();

queue->Close();

// Connect to a queue on the local computer.
MessageQueue queue = new MessageQueue(".\\exampleQueue");

// Refresh the queue's property values to obtain its current state.
queue.Refresh();

注解

Refresh 将 a MessageQueue 的属性与其关联的消息队列服务器资源同步。 如果自创建服务器MessageQueue以来服务器上发生了任何属性(例如LabelCategory)更改,Refresh请使用MessageQueue新信息更新该属性。

下表显示了此方法在各种工作组模式下是否可用。

工作组模式 可用
本地计算机 Yes
本地计算机和直接格式名称 Yes
远程计算机 No
远程计算机和直接格式名称 Yes

适用于

另请参阅