Class DebugToolRegistry
- Namespace
- Icy.Diagnostics
- Assembly
- IcyUI.dll
The catalog of debug overlays and HUD panels a configuration knows about, keyed by the name markup/ ActiveDebugTools activates them under.
public class DebugToolRegistry
- Inheritance
-
DebugToolRegistry
- Inherited Members
- Extension Methods
Remarks
Reached as Diagnostics, and configured fluently through ConfigureDiagnostics(IConfigurationBuilder, Action<DebugToolRegistry>). This is the catalog of what tools exist - deliberately separate from ActiveDebugTools, which is the per-canvas runtime selection of which of them are currently on, so toggling tools on/off at runtime never touches the catalog.
Constructors
DebugToolRegistry()
Initializes a new instance of the DebugToolRegistry class, seeded with the built-in "Bounds"/"Focus" overlays and the "DiagnosticsHud" panel.
public DebugToolRegistry()
Properties
Overlays
Gets the registered overlays, keyed by Name.
public IReadOnlyDictionary<string, IDebugOverlay> Overlays { get; }
Property Value
Panels
Gets the registered HUD panels, keyed by Name.
public IReadOnlyDictionary<string, IDebugHudPanel> Panels { get; }
Property Value
Methods
RegisterOverlay(IDebugOverlay)
Registers overlay as a debug overlay, under its own Name.
public DebugToolRegistry RegisterOverlay(IDebugOverlay overlay)
Parameters
overlayIDebugOverlayThe overlay instance to register.
Returns
- DebugToolRegistry
This registry, for chaining.
Exceptions
- DiagnosticsException
A different overlay type is already registered under
overlay's name.
RegisterOverlay(Type)
Registers type as a debug overlay, constructed with its parameterless constructor.
public DebugToolRegistry RegisterOverlay(Type type)
Parameters
typeTypeThe overlay type to register. Must implement IDebugOverlay.
Returns
- DebugToolRegistry
This registry, for chaining.
Exceptions
- DiagnosticsException
typedoesn't implement IDebugOverlay.
RegisterOverlay<T>()
Registers T as a debug overlay, constructed with its parameterless constructor.
public DebugToolRegistry RegisterOverlay<T>() where T : IDebugOverlay, new()
Returns
- DebugToolRegistry
This registry, for chaining.
Type Parameters
TThe overlay type to register.
RegisterPanel(IDebugHudPanel)
Registers panel as a HUD panel, under its own Name.
public DebugToolRegistry RegisterPanel(IDebugHudPanel panel)
Parameters
panelIDebugHudPanelThe panel instance to register.
Returns
- DebugToolRegistry
This registry, for chaining.
Exceptions
- DiagnosticsException
A different panel type is already registered under
panel's name.
RegisterPanel(Type)
Registers type as a HUD panel, constructed with its parameterless constructor.
public DebugToolRegistry RegisterPanel(Type type)
Parameters
typeTypeThe panel type to register. Must implement IDebugHudPanel.
Returns
- DebugToolRegistry
This registry, for chaining.
Exceptions
- DiagnosticsException
typedoesn't implement IDebugHudPanel.
RegisterPanel<T>()
Registers T as a HUD panel, constructed with its parameterless constructor.
public DebugToolRegistry RegisterPanel<T>() where T : IDebugHudPanel, new()
Returns
- DebugToolRegistry
This registry, for chaining.
Type Parameters
TThe panel type to register.