Struct LeaderboardPage
Immutable page of ranked entries for a single board, plus the total ranked-player count for that board (which may exceed Entries's count when the page is a partial window).
Inherited Members
Namespace: Serenity.Leaderboard.Domain.ValueObjects
Assembly: Serenity.Leaderboard.Domain.dll
Syntax
public readonly struct LeaderboardPage
Constructors
LeaderboardPage(BoardId, IReadOnlyList<RankedEntry>, int)
Creates a new LeaderboardPage with the specified data.
Declaration
public LeaderboardPage(BoardId board, IReadOnlyList<RankedEntry> entries, int totalRankedPlayerCount)
Parameters
| Type | Name | Description |
|---|---|---|
| BoardId | board | The board this page belongs to. |
| IReadOnlyList<RankedEntry> | entries | The ranked entries contained in this page. A defensive copy is recommended when the source list is mutable. |
| int | totalRankedPlayerCount | The number of distinct players ranked on the board. |
Fields
Board
The board this page belongs to.
Declaration
public readonly BoardId Board
Field Value
| Type | Description |
|---|---|
| BoardId |
Entries
The ranked entries contained in this page.
Declaration
public readonly IReadOnlyList<RankedEntry> Entries
Field Value
| Type | Description |
|---|---|
| IReadOnlyList<RankedEntry> |
TotalRankedPlayerCount
The number of distinct players ranked on the board, independent of page size. In FullHistory retention this is NOT the raw submission count.
Declaration
public readonly int TotalRankedPlayerCount
Field Value
| Type | Description |
|---|---|
| int |
Methods
Empty(BoardId)
Creates an empty page for the specified board.
Declaration
public static LeaderboardPage Empty(BoardId board)
Parameters
| Type | Name | Description |
|---|---|---|
| BoardId | board | The board this empty page belongs to. |
Returns
| Type | Description |
|---|---|
| LeaderboardPage |
ToString()
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string |