EwsDownloadItemIds Method (FolderId, Boolean) |
Namespace: MailBee.EwsMail
Exception | Condition |
---|---|
MailBeeException | An error occurred and ThrowExceptions is true. |
NotImplementedException | The .NET runtime is .NET Core. |
To specify the folder by its name, first get its ID with FindFolderIdByShortName(FolderId, String) or FindFolderIdByFullName(String) method.
You can use this method to get the list of all IDs in the folder. You can then use methods like DownloadItems(IEnumerableEwsItem, EwsItemParts) to get full items for the returned list (you can also process the returned list to make any subset from it or change sorting order, for instance, to implement paged output). You can also use MS Exchange's own mechanism of paging using ItemView objects with methods like DownloadItemIds(FolderId, ItemView, bool) or DownloadItems(FolderId, ItemView, bool, EwsItemParts).
Item string IDs (UniqueId value) can then be stored elsewhere, and you can later recreate EwsItem from that string using EwsItem(String) constructor.
Items are returned in the default sorting order which usually means "newer first" in Exchange. This is different from IMAP and POP3, where "older first" is the default.
Note |
---|
In the returned collection of EwsItem objects, you can access their Id and UniqueId properties only. Accessing other properties will cause an exception (because only ID was loaded for each item). |
Note |
---|
This method is not implemented in .NET Core. Use DownloadItemIdsAsync(FolderId, Boolean) instead. |