logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class ScoreMetricSortMapping

    Pure mapping from a ScoreMetricKind to the leaderboard sort direction that makes sense for it (e.g. lower is better for elapsed time).

    Inheritance
    object
    ScoreMetricSortMapping
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Serenity.Leaderboard.Domain.Services
    Assembly: Serenity.Leaderboard.Domain.dll
    Syntax
    public static class ScoreMetricSortMapping

    Methods

    FromMetricKind(ScoreMetricKind)

    Maps a score metric kind to its natural leaderboard sort direction.

    Declaration
    public static LeaderboardSortDirection FromMetricKind(ScoreMetricKind metricKind)
    Parameters
    Type Name Description
    ScoreMetricKind metricKind

    The score metric kind to map.

    Returns
    Type Description
    LeaderboardSortDirection

    Ascending for Time; otherwise Descending.

    In this article
    © 2026 Serenity. All Rights Reserved