Table of Contents

Interface IAlgorithmPluginManager

Namespace
DotCompute.Runtime.Services
Assembly
DotCompute.Runtime.dll

Algorithm plugin manager interface

public interface IAlgorithmPluginManager

Methods

GetPluginAsync<T>(string)

Gets a plugin by its ID

Task<T?> GetPluginAsync<T>(string pluginId) where T : class

Parameters

pluginId string

The plugin ID

Returns

Task<T>

The plugin instance or null if not found

Type Parameters

T

The plugin interface type

GetPluginInfo()

Gets plugin information

IEnumerable<PluginInfo> GetPluginInfo()

Returns

IEnumerable<PluginInfo>

Information about all loaded plugins

GetPluginsAsync<T>()

Gets all plugins of a specific type

Task<IEnumerable<T>> GetPluginsAsync<T>() where T : class

Returns

Task<IEnumerable<T>>

All plugins of the specified type

Type Parameters

T

The plugin interface type

LoadPluginsAsync()

Loads all algorithm plugins from configured directories

Task LoadPluginsAsync()

Returns

Task

A task representing the load operation

RegisterPluginAsync<T>(string, T)

Registers a plugin instance

Task RegisterPluginAsync<T>(string pluginId, T plugin) where T : class

Parameters

pluginId string

The plugin ID

plugin T

The plugin instance

Returns

Task

A task representing the registration operation

Type Parameters

T

The plugin interface type

ReloadPluginsAsync()

Reloads all plugins (if hot reload is enabled)

Task ReloadPluginsAsync()

Returns

Task

A task representing the reload operation

UnloadPluginAsync(string)

Unloads a plugin

Task UnloadPluginAsync(string pluginId)

Parameters

pluginId string

The plugin ID

Returns

Task

A task representing the unload operation