MimeIteratorPathSpecifier Property

Get the path specifier for the current entity.

Definition

Namespace: MimeKit
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
C#
public string PathSpecifier { get; }

Property Value

String
The path specifier.

Remarks

After an iterator is created or after the Reset method is called, the MoveNext method must be called to advance the iterator to the first entity of the message before reading the value of the PathSpecifier property; otherwise, PathSpecifier throws a InvalidOperationException. PathSpecifier also throws a InvalidOperationException if the last call to MoveNext returned false, which indicates the end of the message.

Path specifiers follow the IMAP part specifier conventions defined in rfc3501: the children of a multipart are numbered starting at 1 and a non-multipart message body (including the top-level body of the message) is part 1 of its message. Since IMAP does not assign a part number to a multipart that is the body of a message, MimeKit uses 0 for such multiparts (e.g. "0" for the top-level multipart and "3.0" for the multipart body of the message contained within part 3).

Exceptions

InvalidOperationException Either MoveNext has not been called or MoveNext has moved beyond the end of the message.

See Also