0

This might be stupid but i have been looking for this for a long time now and i still don't have any idea on how to do it. my problem is that i got a folderId(which has no name but just the UniqueId) coming from an event and i want to know if this forder is the DeletedItems one.

when i call the methods :

new FolderId(WellKnownFolderName.DeletedItems)

or

new FolderId(WellKnownFolderName.DeletedItems, mailBox)

i just get a FolderId which name is set but UniqueId is still null, therefore i can't compare UniqueId, the method Equals also fail... Btw, i working on exchange server 2013 with an impersonatedUser.

Edit : I feel even more stupid as i finally found out how easy it was : *

var folder = Folder.Bind(ewsInstance, WellKnownFolderName.DeletedItems);
if (Equals(event.ParentFolderId.UniqueId, folder.Id.UniqueId))
4

1 回答 1

1

终于找到了答案:

var folder = Folder.Bind(ewsInstance, WellKnownFolderName.DeletedItems);
if (Equals(event.ParentFolderId.UniqueId, folder.Id.UniqueId))//...
于 2014-09-04T12:03:39.490 回答