Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ Sort() [5/5]

void System.Collections.Generic.ArraySortHelper< TKey, TValue >.Sort ( Span< TKey > keys,
Span< TValue > values,
IComparer< TKey > comparer )
inline

Implements System.Collections.Generic.IArraySortHelper< TKey, TValue >.

Definition at line 261 of file ArraySortHelper.cs.

262 {
263 try
264 {
265 IntrospectiveSort(keys, values, comparer ?? Comparer<TKey>.Default);
266 }
267 catch (IndexOutOfRangeException)
268 {
269 ThrowHelper.ThrowArgumentException_BadComparer(comparer);
270 }
271 catch (Exception e)
272 {
273 ThrowHelper.ThrowInvalidOperationException(ExceptionResource.InvalidOperation_IComparerFailed, e);
274 }
275 }
static void IntrospectiveSort(Span< T > keys, Comparison< T > comparer)

References System.comparer, System.Collections.Generic.ArraySortHelper< TKey, TValue >.Default, System.Collections.Generic.ArraySortHelper< TKey, TValue >.IntrospectiveSort(), System.keys, System.ThrowHelper.ThrowArgumentException_BadComparer(), System.ThrowHelper.ThrowInvalidOperationException(), and System.values.