4.2 Scenario: Retrieving IncomingTransactionalTransferInfo for an ApplicationQueue
The following diagram depicts the use of MSMQManagement, MSMQQueueManagement, and MSMQCollection in the retrieval of the EODTargetInfo collection from the IncomingTransactionalTransferInfo property of an ApplicationQueue, followed by the retrieval of the SeqNo property, which was arbitrarily selected from the available properties for the purposes of this example. First, an instance of the MSMQManagement object is created. Next, the MSMQManagement.Init method is called to initialize the instance to represent the state of the ApplicationQueue of interest. To obtain more detailed information about the ApplicationQueue, the MSMQManagement instance is queried as described in section 3.4.3 to obtain an MSMQQueueManagement instance. Then the MSMQQueueManagement.EodGetReceiveInfo method is called, which returns an MSMQCollection instance that contains the EODTargetInfo collection for the IncomingTransactionalTransferInfo property of the ApplicationQueue represented by the MSMQQueueManagement instance. Finally, the MSMQCollection.Item method is called, specifying the SeqNo property.

Figure 4: Retrieving IncomingTransactionalTransferInfo for an ApplicationQueue