Struct LeaderboardEntry
A single leaderboard submission: which player achieved which value on which board, and
when. The timestamp is always injected by the caller (Application or Infrastructure); this
value object never stamps a timestamp itself.
Immutable value object that supports equality comparison.
Assembly: Serenity.Leaderboard.Domain.dll
Syntax
public readonly struct LeaderboardEntry : IEquatable<LeaderboardEntry>
Constructors
LeaderboardEntry(BoardId, PlayerId, string, double, long, string)
Creates a new LeaderboardEntry with the specified data.
Declaration
public LeaderboardEntry(BoardId board, PlayerId player, string displayName, double value, long achievedAtUtcTicks, string metadata)
Parameters
| Type |
Name |
Description |
| BoardId |
board |
The board this entry belongs to.
|
| PlayerId |
player |
The player who achieved this entry.
|
| string |
displayName |
The display name shown for this entry.
|
| double |
value |
The achieved metric value.
|
| long |
achievedAtUtcTicks |
The UTC timestamp (in ticks) at which this value was achieved.
|
| string |
metadata |
Optional free-form metadata. May be null.
|
Fields
AchievedAtUtcTicks
The UTC timestamp (in ticks) at which this value was achieved.
Declaration
public readonly long AchievedAtUtcTicks
Field Value
Board
The board this entry belongs to.
Declaration
public readonly BoardId Board
Field Value
DisplayName
The display name shown for this entry.
Declaration
public readonly string DisplayName
Field Value
Metadata
Optional free-form metadata associated with this entry. May be null.
Declaration
public readonly string Metadata
Field Value
Player
The player who achieved this entry.
Declaration
public readonly PlayerId Player
Field Value
Value
The achieved metric value. Ranking ties are detected by exact double equality
(relational RANK() semantics); quantize computed floating-point values before
submitting them if they are expected to tie.
Declaration
public readonly double Value
Field Value
Methods
Equals(LeaderboardEntry)
Declaration
public bool Equals(LeaderboardEntry other)
Parameters
Returns
Equals(object)
Declaration
public override bool Equals(object obj)
Parameters
| Type |
Name |
Description |
| object |
obj |
|
Returns
Overrides
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Overrides
ToString()
Declaration
public override string ToString()
Returns
Overrides
Operators
operator ==(LeaderboardEntry, LeaderboardEntry)
Declaration
public static bool operator ==(LeaderboardEntry left, LeaderboardEntry right)
Parameters
Returns
operator !=(LeaderboardEntry, LeaderboardEntry)
Declaration
public static bool operator !=(LeaderboardEntry left, LeaderboardEntry right)
Parameters
Returns
Implements