Table of Contents

Class KernelRegistry

Namespace
DotBoxD.Plugins
Assembly
DotBoxD.Plugins.dll
public sealed class KernelRegistry : IEnumerable<InstalledKernel>, IEnumerable
Inheritance
KernelRegistry
Implements
Inherited Members

Methods

Get(string)

public InstalledKernel Get(string pluginId)

Parameters

pluginId string

Returns

InstalledKernel

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

IEnumerator<InstalledKernel>

Get<TState>(string)

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

Parameters

pluginId string

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

IReadOnlyList<InstalledKernel>

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

pluginId string
kernel InstalledKernel

Returns

bool