logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    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.

    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetType()
    Namespace: Serenity.Character.Domain.ValueObjects
    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
    Type Description
    CharacterId

    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
    Type Description
    bool

    IsSpawned

    Whether the character spawned.

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

    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
    Type Name Description
    CharacterId characterId
    Returns
    Type Description
    CharacterSpawnAttempt

    RefusedAndReported()

    The spawn was refused, and the spawn service already wrote the line that names the cause.

    Declaration
    public static CharacterSpawnAttempt RefusedAndReported()
    Returns
    Type Description
    CharacterSpawnAttempt

    Spawned(CharacterId)

    The character spawned as characterId.

    Declaration
    public static CharacterSpawnAttempt Spawned(CharacterId characterId)
    Parameters
    Type Name Description
    CharacterId characterId
    Returns
    Type Description
    CharacterSpawnAttempt
    In this article
    © 2026 Serenity. All Rights Reserved