Struct GameSessionSnapshot
Immutable representation of a game session's state at a point in time.
Inherited Members
Namespace: Serenity.GameSession.Domain.ValueObjects
Assembly: Serenity.GameSession.Domain.dll
Syntax
public readonly struct GameSessionSnapshot
Constructors
GameSessionSnapshot(GameSessionId, GameSessionStatus, float, ScoreSnapshot)
Creates a new GameSessionSnapshot.
Declaration
public GameSessionSnapshot(GameSessionId id, GameSessionStatus status, float elapsedTime, ScoreSnapshot score)
Parameters
| Type | Name | Description |
|---|---|---|
| GameSessionId | id | The session identity. |
| GameSessionStatus | status | The session status. |
| float | elapsedTime | The total elapsed time in seconds. |
| ScoreSnapshot | score | The score snapshot. |
Fields
ElapsedTime
The total elapsed game time in seconds.
Declaration
public readonly float ElapsedTime
Field Value
| Type | Description |
|---|---|
| float |
Id
The session identity.
Declaration
public readonly GameSessionId Id
Field Value
| Type | Description |
|---|---|
| GameSessionId |
Score
The score snapshot at the time of the session snapshot.
Declaration
public readonly ScoreSnapshot Score
Field Value
| Type | Description |
|---|---|
| ScoreSnapshot |
Status
The session status at the time of the snapshot.
Declaration
public readonly GameSessionStatus Status
Field Value
| Type | Description |
|---|---|
| GameSessionStatus |
Methods
ToString()
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string |