Struct PoolStateSnapshot
Immutable snapshot of pool usage and availability for a single spawn type.
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
AvailableCount
The number of available (pooled) instances.
Declaration
public readonly int AvailableCount
Field Value
TotalCount
The total number of instances (active + available).
Declaration
public readonly int TotalCount
Field Value
Type
The spawn type this snapshot describes.
Declaration
public readonly SpawnType Type
Field Value
Methods
Equals(PoolStateSnapshot)
Declaration
public bool Equals(PoolStateSnapshot other)
Parameters
Returns
Equals(object)
Declaration
public override bool Equals(object obj)
Parameters
| Type |
Name |
Description |
| object |
obj |
|
Returns
Overrides
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Overrides
ToString()
Declaration
public override string ToString()
Returns
Overrides
Operators
operator ==(PoolStateSnapshot, PoolStateSnapshot)
Declaration
public static bool operator ==(PoolStateSnapshot left, PoolStateSnapshot right)
Parameters
Returns
operator !=(PoolStateSnapshot, PoolStateSnapshot)
Declaration
public static bool operator !=(PoolStateSnapshot left, PoolStateSnapshot right)
Parameters
Returns
Implements