MboxStorageReader.EnumerateMessages

EnumerateMessages()

Exposes the enumerator, which supports an iteration of messages in storage.

public IEnumerable<MailMessage> EnumerateMessages()

Return Value

IEnumerable, that represents an enumerator that iterates through a messages in storage.

See Also


EnumerateMessages(MailQuery)

Enumerates the mail messages that match the specified query.

public IEnumerable<MailMessage> EnumerateMessages(MailQuery query)
ParameterTypeDescription
queryMailQueryThe MailQuery used to filter messages.

Return Value

An enumerable collection of MailMessage instances that match the specified query. The collection may be empty if no messages match.

See Also


EnumerateMessages(int, int)

Enumerates a specified number of mail messages, starting from the given index.

public IEnumerable<MailMessage> EnumerateMessages(int startIndex, int count)
ParameterTypeDescription
startIndexInt32The zero-based index of the first message to retrieve. If startIndex is greater than or equal to the total number of items, an ArgumentOutOfRangeException is thrown.
countInt32The maximum number of messages to retrieve. If set to -1, all messages from the start index will be read.

Return Value

An enumerable collection of MailMessage instances starting from the specified index. The collection may be empty if there are no messages in the specified range.

Exceptions

exceptioncondition
ArgumentOutOfRangeExceptionThrown when startIndex is greater than or equal to the total number of available messages.

See Also


EnumerateMessages(EmlLoadOptions)

Exposes the enumerator, which supports an iteration of messages in storage.

public IEnumerable<MailMessage> EnumerateMessages(EmlLoadOptions options)
ParameterTypeDescription
optionsEmlLoadOptionsSpecifies EmlLoadOptions when reading message from Mbox storage.

Return Value

IEnumerable, that represents an enumerator that iterates through a messages in storage.

See Also


EnumerateMessages(EmlLoadOptions, MailQuery)

Enumerates the mail messages that match the specified query, using the provided load options.

public IEnumerable<MailMessage> EnumerateMessages(EmlLoadOptions options, MailQuery query)
ParameterTypeDescription
optionsEmlLoadOptionsThe EmlLoadOptions specifying how EML should be read.
queryMailQueryThe MailQuery used to filter messages.

Return Value

An enumerable collection of MailMessage instances that match the specified query. The collection may be empty if no messages match.

See Also


EnumerateMessages(EmlLoadOptions, int, int)

Enumerates a specified number of mail messages, starting from the given index, using the provided load options.

public IEnumerable<MailMessage> EnumerateMessages(EmlLoadOptions options, int startIndex, int count)
ParameterTypeDescription
optionsEmlLoadOptionsThe EmlLoadOptions specifying how EML files should be loaded.
startIndexInt32The zero-based index of the first message to retrieve. If startIndex is greater than or equal to the total number of items, an ArgumentOutOfRangeException is thrown.
countInt32The maximum number of messages to retrieve. If set to -1, all messages from the start index will be read.

Return Value

An enumerable collection of MailMessage instances starting from the specified index. The collection may be empty if there are no messages in the specified range.

Exceptions

exceptioncondition
ArgumentOutOfRangeExceptionThrown when startIndex is greater than or equal to the total number of available messages.

See Also