Body Part Object Hierarchies

Body Part Object Hierarchies

The various body parts of messages are represented in Microsoft Collaboration Data Objects (CDO) as hierarchies of BodyPart objects. Each body part in the hierarchy is represented with an object, regardless of whether it acts as a multipart body part that provides hierarchy, or as a content containing body part. The Message object anchors the Multipurpose Internet Mail Extensions (MIME) hierarchy. The following figure illustrates such a hierarchy:

Example of a BodyPart Hierarchy

ms527239.3227d55e-14ad-4e0b-8982-2ffd21d2e36a(en-us,EXCHG.10).gif

Navigating through the body part hierarchy is facilitated through the IBodyPart.BodyParts collection (children) and the IBodyPart.Parent property on each object. The root of the hierarchy has no parent, and thus the IBodyPart.Parent property returns no valid object. When a terminating leaf body part is encountered, the IBodyPart.BodyParts collection is empty. Additionally, a terminating leaf body part does not have a multipart content type.