logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class GameplayReadinessGate

    Default IGameplayReadinessGate implementation backed by a TaskCompletionSource<TResult>. Thread-safe; MarkReady() is idempotent within a session and Reset() rearms the gate for the next session.

    Inheritance
    object
    GameplayReadinessGate
    Implements
    IGameplayReadinessGate
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Serenity.GameMode.Application.Services
    Assembly: Serenity.GameMode.Application.dll
    Syntax
    public class GameplayReadinessGate : IGameplayReadinessGate

    Constructors

    GameplayReadinessGate()

    Creates a gate in the not-ready state.

    Declaration
    public GameplayReadinessGate()

    Properties

    IsReady

    True once MarkReady() has been called for the current session.

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

    Methods

    MarkReady()

    Marks the current session ready. Idempotent within a session.

    Declaration
    public void MarkReady()

    Reset()

    Resets the gate so the next session starts in the not-ready state.

    Declaration
    public void Reset()

    WaitUntilReadyAsync(CancellationToken)

    Completes when the current session is marked ready, or when cancellationToken is cancelled.

    Declaration
    public Task WaitUntilReadyAsync(CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    CancellationToken cancellationToken
    Returns
    Type Description
    Task

    Implements

    IGameplayReadinessGate
    In this article
    © 2026 Serenity. All Rights Reserved