ImapSortedSearchAsync Method

Namespace: MailBee.ImapMail
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 12.4 build 677 for .NET 4.5
Syntax
public Task<MessageIndexCollection> SortedSearchAsync(
	bool returnUids,
	string searchCondition,
	string charset,
	string orderBy
)

Parameters

returnUids
Type: SystemBoolean
If true, search results will be returned as UidCollection; otherwise, as MessageNumberCollection.
searchCondition
Type: SystemString
Search expression in IMAP4 language, or a null reference (Nothing in Visual Basic) to make the method return all messages in the folder.
charset
Type: SystemString
Charset used in searchCondition, or a null reference to use US-ASCII setting.
orderBy
Type: SystemString
Sorting order expression in IMAP4 language, or a null reference (Nothing in Visual Basic) to make the method downgrade to the regular Search(Boolean, String, String).

Return Value

Type: TaskMessageIndexCollection
A task that represents the asynchronous operation. The value of TResult parameter is UidCollection or MessageNumberCollection object if the command succeeded; otherwise, a null reference (Nothing in Visual Basic).
Exceptions
ExceptionCondition
MailBeeExceptionAn error occurred and ThrowExceptions is true.
See Also