logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Struct ScoreKey

    Identifies a score metric within the scoring system. Immutable value object that supports equality comparison and hashing.

    Implements
    IEquatable<ScoreKey>
    Inherited Members
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetType()
    Namespace: Serenity.Score.Domain.ValueObjects
    Assembly: Serenity.Score.Domain.dll
    Syntax
    public readonly struct ScoreKey : IEquatable<ScoreKey>

    Constructors

    ScoreKey(string)

    Creates a new ScoreKey with the specified identifier.

    Declaration
    public ScoreKey(string value)
    Parameters
    Type Name Description
    string value

    The unique string identifier. Cannot be null.

    Fields

    Value

    The unique string identifier for this score metric.

    Declaration
    public readonly string Value
    Field Value
    Type Description
    string

    Properties

    IsValid

    Checks if this ScoreKey has a valid, non-empty value.

    Declaration
    public bool IsValid { get; }
    Property Value
    Type Description
    bool

    Methods

    Equals(ScoreKey)

    Declaration
    public bool Equals(ScoreKey other)
    Parameters
    Type Name Description
    ScoreKey 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 ==(ScoreKey, ScoreKey)

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

    explicit operator ScoreKey(string)

    Declaration
    public static explicit operator ScoreKey(string value)
    Parameters
    Type Name Description
    string value
    Returns
    Type Description
    ScoreKey

    implicit operator string(ScoreKey)

    Declaration
    public static implicit operator string(ScoreKey key)
    Parameters
    Type Name Description
    ScoreKey key
    Returns
    Type Description
    string

    operator !=(ScoreKey, ScoreKey)

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

    Implements

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