Struct CharacterSpawnAttempt
What came of asking for one character: the spawned character's identity, or a refusal — and, for a refusal,
whether the spawn service already told the author why. A caller that forfeits what was refused reads
IsRefusalReported to decide whether it still has something to say: a reported refusal has its
one author-facing line already, and repeating it only buries the cause.
Assembly: Serenity.Character.Domain.dll
Syntax
public readonly struct CharacterSpawnAttempt
Properties
CharacterId
The spawned character's identity; not valid when the spawn was refused.
Declaration
public CharacterId CharacterId { get; }
Property Value
IsRefusalReported
Whether the spawn was refused and the spawn service already reported the cause to the author.
Never true for a spawned character.
Declaration
public bool IsRefusalReported { get; }
Property Value
IsSpawned
Whether the character spawned.
Declaration
public bool IsSpawned { get; }
Property Value
Methods
FromUnexplainedResult(CharacterId)
Reads the bare identity a spawn service that reports nothing returns: a valid identity is a spawned
character, anything else a refusal nobody explained yet.
Declaration
public static CharacterSpawnAttempt FromUnexplainedResult(CharacterId characterId)
Parameters
Returns
RefusedAndReported()
The spawn was refused, and the spawn service already wrote the line that names the cause.
Declaration
public static CharacterSpawnAttempt RefusedAndReported()
Returns
Spawned(CharacterId)
The character spawned as characterId.
Declaration
public static CharacterSpawnAttempt Spawned(CharacterId characterId)
Parameters
Returns