logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Struct PoolStateSnapshot

    Immutable snapshot of pool usage and availability for a single spawn type.

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

    Constructors

    PoolStateSnapshot(SpawnType, int, int, int)

    Creates a new PoolStateSnapshot.

    Declaration
    public PoolStateSnapshot(SpawnType type, int activeCount, int availableCount, int totalCount)
    Parameters
    Type Name Description
    SpawnType type

    The spawn type.

    int activeCount

    The number of active instances.

    int availableCount

    The number of available instances.

    int totalCount

    The total number of instances.

    Fields

    ActiveCount

    The number of currently active instances.

    Declaration
    public readonly int ActiveCount
    Field Value
    Type Description
    int

    AvailableCount

    The number of available (pooled) instances.

    Declaration
    public readonly int AvailableCount
    Field Value
    Type Description
    int

    TotalCount

    The total number of instances (active + available).

    Declaration
    public readonly int TotalCount
    Field Value
    Type Description
    int

    Type

    The spawn type this snapshot describes.

    Declaration
    public readonly SpawnType Type
    Field Value
    Type Description
    SpawnType

    Methods

    Equals(PoolStateSnapshot)

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

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

    operator !=(PoolStateSnapshot, PoolStateSnapshot)

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

    Implements

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