MessageQueue.Refresh 方法

定義

重新整理由 MessageQueue 所表示的屬性,以反映資源的目前狀態。Refreshes the properties presented by the MessageQueue to reflect the current state of the resource.

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

範例

下列程式碼範例示範 Refresh 的用法。The following code example demonstrates the use of 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 將的屬性與其 MessageQueue 相關聯的訊息佇列伺服器資源進行同步處理。Refresh synchronizes the properties of a MessageQueue with its associated Message Queuing server resource. 如果在 Label 建立之後,伺服器上的任何屬性(例如或 Category )已變更,則會 MessageQueue Refresh MessageQueue 以新的資訊更新。If any property, such as Label or Category, has changed on the server since the time the MessageQueue was created, Refresh updates the MessageQueue with the new information.

下表顯示此方法是否適用于各種工作組模式。The following table shows whether this method is available in various Workgroup modes.

工作組模式Workgroup mode 可用Available
本機電腦Local computer Yes
本機電腦和直接格式名稱Local computer and direct format name Yes
遠端電腦Remote computer No
遠端電腦和直接格式名稱Remote computer and direct format name Yes

適用於

另請參閱