Struct SingletonSelectionResult<T>
What a singleton settings lookup resolved: the candidate the runtime will use, the candidates it shadowed, and how the pick was made. The shadowed candidates are part of the answer, not a detail — a lookup that silently drops them leaves an author with a settings asset the game never reads and nothing anywhere saying so.
Inherited Members
Namespace: Serenity.Shared.Utils
Assembly: Serenity.Shared.dll
Syntax
public readonly struct SingletonSelectionResult<T>
Type Parameters
| Name | Description |
|---|---|
| T | The candidate type the caller resolves. |
Constructors
SingletonSelectionResult(T, IReadOnlyList<T>, SingletonSelectionOutcome, SingletonSelectionRung)
Declaration
public SingletonSelectionResult(T picked, IReadOnlyList<T> shadowed, SingletonSelectionOutcome outcome, SingletonSelectionRung decidingRung = SingletonSelectionRung.None)
Parameters
| Type | Name | Description |
|---|---|---|
| T | picked | |
| IReadOnlyList<T> | shadowed | |
| SingletonSelectionOutcome | outcome | |
| SingletonSelectionRung | decidingRung |
Properties
DecidingRung
Declaration
public SingletonSelectionRung DecidingRung { get; }
Property Value
| Type | Description |
|---|---|
| SingletonSelectionRung | Which rung of the ordering separated Picked from the first of Shadowed — None when at most one candidate existed. |
Outcome
Declaration
public SingletonSelectionOutcome Outcome { get; }
Property Value
| Type | Description |
|---|---|
| SingletonSelectionOutcome | How Picked was chosen — see SingletonSelectionOutcome. |
Picked
Declaration
public T Picked { get; }
Property Value
| Type | Description |
|---|---|
| T | The candidate the runtime uses, or |
Shadowed
Declaration
public IReadOnlyList<T> Shadowed { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<T> | Every candidate that lost, project-owned ones first, then by Id — the order a reader is meant to work through them in. Empty when at most one candidate existed. |