2.4 KiB
2.4 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | ||||
|---|---|---|---|---|---|---|---|---|
|
2026-04-17T15:38:45.565653+00:00 | zai-org/GLM-5-FP8 | 1 | 4a5da7eb91c3d413 |
PluginLib Module Documentation
1. Purpose
The PluginLib module provides a Managed Extensibility Framework (MEF)-based plugin system for the DataPRO application. It handles discovery, loading, and retrieval of plugins from configurable directories, supporting both single and multiple plugin exports of the same type. The module implements a thread-safe singleton pattern for plugin management and integrates with the application's configuration system.
2. Public Interface
PluginManager Class
The primary class for interacting with the plugin system.
| Method | Signature | Description |
|---|---|---|
GetPluginManager |
public static PluginManager GetPluginManager() |
Returns the singleton instance of PluginManager. Thread-safe via lock. |
GetPlugin<T> |
public static T GetPlugin<T>() where T : class |
Returns a single MEF plugin export of type T. Returns null if no export exists. |
GetPlugin<T> |
public static T GetPlugin<T>(string configPluginSetting) where T : class |
Returns a specific plugin from multiple exports by matching item.Value.ToString() against configPluginSetting. |
GetPlugins<T> |
public static IEnumerable<Lazy<T>> GetPlugins<T>() where T : class |
Returns all MEF plugin exports of type T as Lazy<T> instances. |
GetPluginList<T> |
public List<Assembly> GetPlugin<T>() where T : class |
Returns a list of distinct assemblies from the first DirectoryCatalog found. Returns null if no directory catalog exists. |
PluginConfig Class (Static)
Configuration helper for plugin settings.
| Member | Signature | Description |
|---|---|---|
DataProPlugins |
public const string DataProPlugins = "dataProPlugins" |
Constant for the app setting key name. |
GetDataProPluginsSetting |
public static string GetDataProPluginsSetting(string setting) |
Concatenates the app setting value from DataProPlugins key with . + setting. |
PluginConfigData Class
XML-serializable configuration data class.
| Field | Type |