Class AchievementRowSorter
Arranges already-mapped achievement rows the way a view asked for them: the requested slice, in the requested order. Pure, so the ordering rules are asserted rather than eyeballed on a running screen.
Inherited Members
Namespace: Serenity.Achievements.Infrastructure.Views
Assembly: Serenity.Achievements.Infrastructure.dll
Syntax
public static class AchievementRowSorter
Remarks
Concealed rows always sort last, whatever the mode. A screen whose first page is a wall of "???" tells the player nothing and buries the achievements they can actually chase; pushing them down costs the hidden ones a good position and nothing else, since a row with no name, no description and no progress has nothing to rank on in three of the four modes anyway.
Methods
Apply(IReadOnlyList<AchievementRowContent>, AchievementRowSortMode, AchievementRowFilterMode)
Filters and orders rows for display.
Declaration
public static IReadOnlyList<AchievementRowContent> Apply(IReadOnlyList<AchievementRowContent> rows, AchievementRowSortMode sortMode, AchievementRowFilterMode filterMode)
Parameters
| Type | Name | Description |
|---|---|---|
| IReadOnlyList<AchievementRowContent> | rows | The mapped rows, in any order. |
| AchievementRowSortMode | sortMode | The order the rows are arranged in. |
| AchievementRowFilterMode | filterMode | The slice of the rows that is kept. |
Returns
| Type | Description |
|---|---|
| IReadOnlyList<AchievementRowContent> | A new list holding the kept rows in display order. Empty when |