Reputation:
When I have a lot of messages in mailbox client.Inbox.Fetch() method last a long time and users think that program is not responding. Can I display progress of fetched messages?
IList<IMessageSummary> allMailList = client.Inbox.Fetch(0, -1, MessageSummaryItems.Envelope | MessageSummaryItems.UniqueId, cancellationToken);
Upvotes: 1
Views: 177
Reputation: 38538
You can connect to the ImapFolder.MessageSummaryFetched
event and, based on the number of times that's been called compared to the number of messages you are fetching summary information for, you can provide some progress reporting.
Upvotes: 1