logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class GameProgressData

    Global, slot-independent per-user progress: how many times the game was completed, which extras were unlocked, and a free-form JSON escape hatch for project-specific progress data this value object does not otherwise model.

    Inheritance
    object
    GameProgressData
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    Namespace: Serenity.GameProgress.Domain.ValueObjects
    Assembly: Serenity.GameProgress.Domain.dll
    Syntax
    public sealed class GameProgressData
    Remarks

    Immutable. Every mutation (Serenity.GameProgress.Application.Services.GameProgressService) produces a new instance rather than modifying this one in place.

    Constructors

    GameProgressData(int, IReadOnlyList<string>, string, long)

    Creates a new GameProgressData.

    Declaration
    public GameProgressData(int completionCount, IReadOnlyList<string> unlockedExtraIds, string customPayloadJson, long updatedAtUtcTicks)
    Parameters
    Type Name Description
    int completionCount

    The number of times the game was completed.

    IReadOnlyList<string> unlockedExtraIds

    The ids of every unlocked extra. Null is treated as empty.

    string customPayloadJson

    Free-form JSON payload for project-specific data. May be null.

    long updatedAtUtcTicks

    The UTC timestamp (in ticks) at which this progress was last changed.

    Fields

    Empty

    The single, shared representation of brand-new progress: zero completions, no unlocked extras, no custom payload.

    Declaration
    public static readonly GameProgressData Empty
    Field Value
    Type Description
    GameProgressData

    Properties

    CompletionCount

    The number of times the game was completed.

    Declaration
    public int CompletionCount { get; }
    Property Value
    Type Description
    int

    CustomPayloadJson

    Free-form JSON payload for project-specific progress data. May be null.

    Declaration
    public string CustomPayloadJson { get; }
    Property Value
    Type Description
    string

    UnlockedExtraIds

    The ids of every unlocked extra. Never null.

    Declaration
    public IReadOnlyList<string> UnlockedExtraIds { get; }
    Property Value
    Type Description
    IReadOnlyList<string>

    UpdatedAtUtcTicks

    The UTC timestamp (in ticks) at which this progress was last changed.

    Declaration
    public long UpdatedAtUtcTicks { get; }
    Property Value
    Type Description
    long

    Methods

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    string
    Overrides
    object.ToString()
    In this article
    © 2026 Serenity. All Rights Reserved