logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Struct AchievementId

    Identifies a single achievement within the achievement system. Immutable value object that supports equality comparison and hashing.

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

    Constructors

    AchievementId(string)

    Creates a new AchievementId with the specified identifier.

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

    The unique string identifier. Cannot be null.

    Fields

    Value

    The unique string identifier for this achievement.

    Declaration
    public readonly string Value
    Field Value
    Type Description
    string

    Properties

    IsValid

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

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

    Methods

    Equals(AchievementId)

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

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

    explicit operator AchievementId(string)

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

    implicit operator string(AchievementId)

    Declaration
    public static implicit operator string(AchievementId id)
    Parameters
    Type Name Description
    AchievementId id
    Returns
    Type Description
    string

    operator !=(AchievementId, AchievementId)

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

    Implements

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