Skip to content

Class KernelRegistry

Namespace: DotBoxD.Plugins
Assembly: DotBoxD.Plugins.dll

public sealed class KernelRegistry : IEnumerable<InstalledKernel>, IEnumerable

objectKernelRegistry

IEnumerable<InstalledKernel>, IEnumerable

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()

public InstalledKernel Get(string pluginId)

pluginId string

InstalledKernel

public TypedInstalledKernel<TState> Get<TState>(string pluginId) where TState : class

pluginId string

TypedInstalledKernel<TState>

TState

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()

IEnumerator<InstalledKernel>

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()

IReadOnlyList<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)

pluginId string

kernel InstalledKernel

bool