Class MakerAnalysisProvider
- Namespace
- SurvivorsMaker.Editor
- Assembly
- SurvivorsMaker.Editor.dll
Finds the IMakerAnalysis the maker tool windows use. Order: Override (tests, custom pipelines), a registered factory, then the default implementation found by type name (DefaultTypeNames), then any public non-abstract implementation inside the Balance assembly. Lookup by name keeps the windows compiling while the implementation is still being built; when nothing is found the windows show "analysis not available" instead of failing.
public static class MakerAnalysisProvider
- Inheritance
-
MakerAnalysisProvider
- Inherited Members
Fields
DefaultTypeNames
Full type names tried in order. Use a type with a static Default/Instance property or a public parameterless constructor.
public static readonly string[] DefaultTypeNames
Field Value
- string[]
Properties
Available
public static bool Available { get; }
Property Value
Message
Why the last lookup failed, or the type that was found.
public static string Message { get; }
Property Value
Override
Wins over everything else while set. Tests set a fake here; set null to restore the normal lookup.
public static IMakerAnalysis Override { get; set; }
Property Value
Methods
Register(Func<IMakerAnalysis>)
Uses factory instead of the type-name lookup (called once, result cached).
public static void Register(Func<IMakerAnalysis> factory)
Parameters
factoryFunc<IMakerAnalysis>
Reset()
Forgets the cached instance so the next call searches again.
public static void Reset()
TryGet(out IMakerAnalysis, out string)
public static bool TryGet(out IMakerAnalysis analysis, out string message)
Parameters
analysisIMakerAnalysismessagestring
Returns
Events
Changed
Raised when the override or registration changes so open windows can refresh.
public static event Action Changed