Class SettingsAssetAuthoring.SettingsResolution<TSettings>
Where a settings asset of type TSettings was found, if anywhere.
Inheritance
SettingsAssetAuthoring.SettingsResolution<TSettings>
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
Declaration
public TSettings Existing
Field Value
| Type |
Description |
| TSettings |
|
MultipleFoundPaths
Declaration
public List<string> MultipleFoundPaths
Field Value
TargetPath
Declaration
Field Value
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