Class KernelRegistry
public sealed class KernelRegistry : IEnumerable<InstalledKernel>, IEnumerable
- Inheritance
-
KernelRegistry
- Implements
- Inherited Members
Methods
Get(string)
public InstalledKernel Get(string pluginId)
Parameters
pluginIdstring
Returns
GetEnumerator()
Enumerates the currently installed kernels over a stable snapshot, so an admin/host UI can
iterate the inventory directly (for example with foreach or LINQ) without taking a
dependency on Snapshot(). Enumeration is detached from registry internals and is
therefore unaffected by concurrent installs and uninstalls.
public IEnumerator<InstalledKernel> GetEnumerator()
Returns
Get<TState>(string)
public TypedInstalledKernel<TState> Get<TState>(string pluginId) where TState : class
Parameters
pluginIdstring
Returns
- TypedInstalledKernel<TState>
Type Parameters
TState
Snapshot()
Returns a stable snapshot of the currently installed kernels for inventory rendering. The returned list is detached from registry internals, so it is safe to enumerate while installs and uninstalls continue concurrently.
public IReadOnlyList<InstalledKernel> Snapshot()
Returns
TryGet(string, out InstalledKernel)
Probes installation state without throwing, letting an admin/host UI discover whether a plugin id is currently installed and read its live kernel without catching KeyNotFoundException.
public bool TryGet(string pluginId, out InstalledKernel kernel)
Parameters
pluginIdstringkernelInstalledKernel