Items to order.
Optionalsorts: List<Sort<TItem>>
Sorts to apply; none, or an empty list, keeps the order.
Optionaloptions: InMemoryQueryItemsReaderOptions<TItem>
Comparison options, see InMemoryQueryItemsReaderOptions.
the ordered items; a copy of the list without sorts.
Orders a list by its sorts, as a server would: by priority (the first sort wins, the next ones break its ties), stable (items equal for every sort keep their order), unset values first when ascending and last when descending. The comparables of every sort are computed once per item, through the comparer of the options (see toComparableValue), so strings are ordered ignoring the case unless
options.caseSensitive. Values that are neither lower nor greater (mixed types,NaN) are equal. The list and its items are never mutated; the result is always a new array.