SearchConversationRetrieveMessages Method |
Namespace: Avaya.ClientServices
public override void RetrieveMessages( MessageRetrievalWatcher watcher )
If older messages are required to be downloaded, the RetrieveMessagesBefore(UInt32, Message) and/or RetrieveMessagesAfter(UInt32, Message) methods can be used to retrieve additional message history. Note however that RetrieveMessages must be called first to install the MessageRetrievalWatcher object that will monitor the retrieval, since these other methods work on a shared collection managed internally by the Conversation object. The application should use the DataRetrievalCollectionChanged event on the supplied watcher object to build up and maintain a local collection of messages associated with this conversation.
When using these message retrieval methods, it is important to note that there can only be a single retrieval operation in progress at any given time. If there is a retrieval operation in progress when once of these three message retrieval methods are called, the currently running retrieval will be cancelled before starting the next operation.
If the client application calls this method additional times, no actual download of messages from the server occurs, but the watcher events that report progress will fire (i.e. "progress" and "done" events). However, no additions to the message collection will occur as a result of the subsequent calls. If a different watcher object is supplied in a subsequent call, the previous watcher object is "unlinked" from the underlying message object collection and will never receive any additional updates.