// ReSharper restore MemberCanBePrivate.Local public int CompareTo(SortRow other) { CancellationToken.ThrowIfCancellationRequested(); for (int i = 0; i < Sorts.Count; i++) { var sort = Sorts[i]; int result = DataSchema.Compare(_keys[i], other._keys[i]); if (sort.SortDirection == ListSortDirection.Descending) { result = -result; } if (result != 0) { return(result); } } return(OriginalRowIndex.CompareTo(other.OriginalRowIndex)); }