MessageQueue.Refresh Method ()

 

Refreshes the properties presented by the MessageQueue to reflect the current state of the resource.

Namespace:   System.Messaging
Assembly:  System.Messaging (in System.Messaging.dll)

public void Refresh()

Refresh synchronizes the properties of a MessageQueue with its associated Message Queuing server resource. 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

The following code example demonstrates the use of Refresh.


// 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();

.NET Framework
Available since 1.1
Return to top
Show: