Class SettingsReferenceRules
The pure decision behind SettingsReferenceInspector: whether a settings field's declared
type is a reference to another catalog system's settings type, and the message a row shows when that
reference is unassigned. No UnityEditor access, so it is testable without any asset on disk.
Inheritance
SettingsReferenceRules
Assembly: Serenity.UnityCreateGame.Infrastructure.Editor.dll
Syntax
public static class SettingsReferenceRules
Methods
BuildDanglingReferenceDetail(string)
The row detail message for a field named fieldDisplayName whose
referenced asset no longer exists.
Declaration
public static string BuildDanglingReferenceDetail(string fieldDisplayName)
Parameters
| Type |
Name |
Description |
| string |
fieldDisplayName |
|
Returns
BuildMissingReferenceDetail(string, string)
The row detail message for a field named fieldDisplayName that must
reference referencedSystemDisplayName but currently does not.
Declaration
public static string BuildMissingReferenceDetail(string fieldDisplayName, string referencedSystemDisplayName)
Parameters
| Type |
Name |
Description |
| string |
fieldDisplayName |
|
| string |
referencedSystemDisplayName |
|
Returns
TryResolveReferencedSystem(Type, SerenityInstallableSystem, IReadOnlyDictionary<SerenityInstallableSystem, Type>, out SerenityInstallableSystem)
True when fieldType can hold an instance of some OTHER catalog system's settings
type — i.e. fieldType is assignable from that system's resolved settings type —
naming the first such system found in settingsTypesByCatalogSystem.
ownerSystem is excluded so a system's own settings type never counts as a
reference to itself.
Declaration
public static bool TryResolveReferencedSystem(Type fieldType, SerenityInstallableSystem ownerSystem, IReadOnlyDictionary<SerenityInstallableSystem, Type> settingsTypesByCatalogSystem, out SerenityInstallableSystem referencedSystem)
Parameters
Returns