logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    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.

    Implements
    IEquatable<LeaderboardEntry>
    Inherited Members
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetType()
    Namespace: Serenity.Leaderboard.Domain.ValueObjects
    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
    Type Description
    long

    Board

    The board this entry belongs to.

    Declaration
    public readonly BoardId Board
    Field Value
    Type Description
    BoardId

    DisplayName

    The display name shown for this entry.

    Declaration
    public readonly string DisplayName
    Field Value
    Type Description
    string

    Metadata

    Optional free-form metadata associated with this entry. May be null.

    Declaration
    public readonly string Metadata
    Field Value
    Type Description
    string

    Player

    The player who achieved this entry.

    Declaration
    public readonly PlayerId Player
    Field Value
    Type Description
    PlayerId

    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
    Type Description
    double

    Methods

    Equals(LeaderboardEntry)

    Declaration
    public bool Equals(LeaderboardEntry other)
    Parameters
    Type Name Description
    LeaderboardEntry other
    Returns
    Type Description
    bool

    Equals(object)

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    object obj
    Returns
    Type Description
    bool
    Overrides
    ValueType.Equals(object)

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int
    Overrides
    ValueType.GetHashCode()

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    string
    Overrides
    ValueType.ToString()

    Operators

    operator ==(LeaderboardEntry, LeaderboardEntry)

    Declaration
    public static bool operator ==(LeaderboardEntry left, LeaderboardEntry right)
    Parameters
    Type Name Description
    LeaderboardEntry left
    LeaderboardEntry right
    Returns
    Type Description
    bool

    operator !=(LeaderboardEntry, LeaderboardEntry)

    Declaration
    public static bool operator !=(LeaderboardEntry left, LeaderboardEntry right)
    Parameters
    Type Name Description
    LeaderboardEntry left
    LeaderboardEntry right
    Returns
    Type Description
    bool

    Implements

    IEquatable<T>
    In this article
    © 2026 Serenity. All Rights Reserved