class
RefSafeApp
public static class RefSafeApp Application-scope composition root for RefSafe Pro. Built once per editor session (re-built automatically on every domain reload via InitializeOnLoadAttribute) and holds every service whose lifetime is "as long as the editor is running": logging, clock, event bus, ignore list store, scan history, scan cache, incremental tracker, the scope-dispatching ScanController, and the IScanIssuesUseCase transaction boundary that wraps it.
Remarks
Per-window state (notifications, UI state that dies with the editor window) is registered as Scoped. Consumers create a scope via RefSafeApp.Services.CreateScope() from inside EditorWindow.OnEnable and dispose it from OnDisable.
Service-locator usage of Services is restricted to a small set of <em>composition-root entry points</em>: <list type="bullet"> <item><description>MainWindow.OnEnable — resolves the per-window scope and the use cases.</description></item> <item><description>RunScan — the -executeMethod entry point.</description></item> <item><description>OnPreprocessBuild — the build-pipeline callback.</description></item> <item><description>[MenuItem] methods (e.g. ContextMenuValidator).</description></item> <item><description>AssetChangeDetector — the AssetPostprocessor callback.</description></item> </list> Everything else takes its dependencies via constructor injection. Reaching back to RefSafeApp.Services from the middle of a call graph is a smell; add the dep to the consuming type's constructor instead.
Properties
Services public static IServiceContainer Services { get; } The application-scope container. Lazily rebuilt on first access after a domain reload.
Generated from Editor/Platform/Bootstrap/RefSafeApp.cs in RefSafe Pro 2.2.0.