Click or drag to resize
MimeKit

MessageSorterSortT(IEnumerableT, IListOrderBy) Method

Sorts the messages by the specified ordering.

Namespace: MailKit
Assembly: MailKit (in MailKit.dll) Version: 4.3.0
Syntax
C#
public static IList<T> Sort<T>(
	this IEnumerable<T> messages,
	IList<OrderBy> orderBy
)
where T : IMessageSummary

Parameters

messages  IEnumerableT
The messages to sort.
orderBy  IListOrderBy
The sort ordering.

Type Parameters

T
The message items must implement the IMessageSummary interface.

Return Value

IListT
The sorted messages.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerableT. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Exceptions
ExceptionCondition
ArgumentNullException

messages is null.

-or-

orderBy is null.

ArgumentException

messages contains one or more items that is missing information needed for sorting.

-or-

orderBy is an empty list.

Remarks
Sorts the messages by the specified ordering.
See Also