Class KernelRegistry
Namespace: DotBoxD.Plugins
Assembly: DotBoxD.Plugins.dll
public sealed class KernelRegistry : IEnumerable<InstalledKernel>, IEnumerableInheritance
Section titled “Inheritance”Implements
Section titled “Implements”IEnumerable<InstalledKernel>, IEnumerable
Inherited Members
Section titled “Inherited Members”object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()
Methods
Section titled “Methods”Get(string)
Section titled “ Get(string)”public InstalledKernel Get(string pluginId)Parameters
Section titled “Parameters”pluginId string
Returns
Section titled “Returns”Get<TState>(string)
Section titled “ Get<TState>(string)”public TypedInstalledKernel<TState> Get<TState>(string pluginId) where TState : classParameters
Section titled “Parameters”pluginId string
Returns
Section titled “Returns”TypedInstalledKernel<TState>
Type Parameters
Section titled “Type Parameters”TState
GetEnumerator()
Section titled “ 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 DotBoxD.Plugins.KernelRegistry.Snapshot. Enumeration is detached from registry internals and is
therefore unaffected by concurrent installs and uninstalls.
public IEnumerator<InstalledKernel> GetEnumerator()Returns
Section titled “Returns”Snapshot()
Section titled “ 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
Section titled “Returns”IReadOnlyList<InstalledKernel>
TryGet(string, out InstalledKernel)
Section titled “ 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
System.Collections.Generic.KeyNotFoundException.
public bool TryGet(string pluginId, out InstalledKernel kernel)Parameters
Section titled “Parameters”pluginId string
kernel InstalledKernel