Attachment Hierarchies
As a parting example, the following code follows or walks the attachment hierarchy of an item and displays it in the console window. If items could have only file attachments, there would be no concept of an attachment hierarchy. But because items can have item attachments, and those item attachments can have their own attachments, a nesting or hierarchy of attachments can indeed be realized. What is important to note is that each attachment has its own attachment id, and if you have the attachment id, you can retrieve any attachment regardless of how deep within an attachment hierarchy it is. Example 12-28 shows us how to walk the attachment hierarchy for any given item.
Example 12-28. Walking attachment hierarchies
/// <summary> ...
Get Inside Microsoft® Exchange Server 2007 Web Services now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.