Class CompositeToolLoadoutRegistry
Chains multiple IToolLoadoutRegistry instances, checking each in order from primary to fallback. Used to overlay user-defined (file-based) loadouts on top of the built-in registry.
public sealed class CompositeToolLoadoutRegistry : IToolLoadoutRegistry
- Inheritance
-
CompositeToolLoadoutRegistry
- Implements
- Inherited Members
Remarks
GetLoadout— first registry that has the name wins.GetAll— union of all registries, deduplicated by name (primary wins).ResolveActivePlugins/ResolveDiscoverablePlugins— merges all loadouts from every registry so that cross-registry parent chains resolve correctly (e.g. a YAML loadout inheriting from a built-in loadout).Register— forwards to the primary (first) registry.
Constructors
CompositeToolLoadoutRegistry(params IToolLoadoutRegistry[])
Initialises the composite with the supplied ordered registries.
public CompositeToolLoadoutRegistry(params IToolLoadoutRegistry[] registries)
Parameters
registriesIToolLoadoutRegistry[]Ordered list — index 0 is checked first.
Methods
GetAll()
Returns all registered loadouts in registration order.
public IReadOnlyList<ToolLoadout> GetAll()
Returns
GetLoadout(string)
Returns the loadout with the given name, or null if not found.
public ToolLoadout? GetLoadout(string name)
Parameters
namestring
Returns
Register(ToolLoadout)
Registers a loadout. Overwrites any existing loadout with the same name.
public void Register(ToolLoadout loadout)
Parameters
loadoutToolLoadout
Remarks
Forwards to the primary (first) registry.
ResolveActivePlugins(string, IEnumerable<KernelPlugin>)
Resolves the set of plugin names that should be actively loaded for the given loadout,
drawing from availablePlugins. Respects inheritance, category
mapping, and disabled-plugin overrides.
public IReadOnlySet<string> ResolveActivePlugins(string loadoutName, IEnumerable<KernelPlugin> availablePlugins)
Parameters
loadoutNamestringName of the loadout to resolve.
availablePluginsIEnumerable<KernelPlugin>All plugins registered on the kernel.
Returns
- IReadOnlySet<string>
Plugin names that should be loaded for this loadout.
ResolveDiscoverablePlugins(string, IEnumerable<KernelPlugin>)
Resolves the set of plugin names that are discoverable (lazy) for the given loadout. These plugins are not loaded by default but can be enabled on request at runtime. Active and disabled plugins are excluded from the discoverable set.
public IReadOnlySet<string> ResolveDiscoverablePlugins(string loadoutName, IEnumerable<KernelPlugin> availablePlugins)
Parameters
loadoutNamestringName of the loadout to resolve.
availablePluginsIEnumerable<KernelPlugin>All plugins registered on the kernel.
Returns
- IReadOnlySet<string>
Plugin names that are discoverable but not currently active.