logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class SettingsAssetAuthoring.SettingsResolution<TSettings>

    Where a settings asset of type TSettings was found, if anywhere.

    Inheritance
    object
    SettingsAssetAuthoring.SettingsResolution<TSettings>
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    Namespace: Serenity.StructuredPersistence.Infrastructure.Editor.Authoring
    Assembly: Serenity.UnityStructuredPersistence.Infrastructure.Editor.dll
    Syntax
    public sealed class SettingsAssetAuthoring.SettingsResolution<TSettings> where TSettings : Object
    Type Parameters
    Name Description
    TSettings

    Constructors

    SettingsResolution()

    Declaration
    public SettingsResolution()

    Fields

    Existing

    The resolved asset, for READING: seeding a wizard's draft from it, previewing what a run would target, deciding whether a run creates or updates. Mutating what this field hands back skips the one place that asks whether the asset may be written at all — call OpenExistingForWriting() instead, the door every creator that edits a resolved asset goes through and which ResolveOrCreateAtPath<TSettings>(SettingsResolution<TSettings>, string, string, string, SerenityAssetCreationTransaction, out bool) already calls on its own callers' behalf.

    Declaration
    public TSettings Existing
    Field Value
    Type Description
    TSettings

    MultipleFoundPaths

    Declaration
    public List<string> MultipleFoundPaths
    Field Value
    Type Description
    List<string>

    TargetPath

    Declaration
    public string TargetPath
    Field Value
    Type Description
    string

    Methods

    OpenExistingForWriting()

    Hands out Existing for MUTATION, after asking Serenity.Global.Infrastructure.Editor.ShippedContentWriteGate whether this run may write to it at all. Throws Serenity.Global.Infrastructure.Editor.ShippedContentWriteRefusedException for an asset the package ships — which every caller already turns into a rolled-back, reported failure — so a creator editing a settings singleton cannot write a shipped one by forgetting a guard. It can only do so by deliberately writing through Existing against that field's own contract, which is what the shipped-content write contract exists to catch.

    Declaration
    public TSettings OpenExistingForWriting()
    Returns
    Type Description
    TSettings

    TryOpenExistingForWriting(out TSettings, out string)

    The reporting form of OpenExistingForWriting(), for a caller outside a transaction's try/catch: false with the gate's own sentence in refusal when the write is refused, true with the asset otherwise. Also false — with a null refusal — when nothing resolved at all, since there is then no existing asset to open.

    Declaration
    public bool TryOpenExistingForWriting(out TSettings writable, out string refusal)
    Parameters
    Type Name Description
    TSettings writable
    string refusal
    Returns
    Type Description
    bool
    In this article
    © 2026 Serenity. All Rights Reserved