Interface IPlugin
- Namespace
- SharpConsoleUI.Plugins
- Assembly
- SharpConsoleUI.dll
Simple plugin interface. Plugins return what they provide via Get* methods.
public interface IPlugin : IDisposable
- Inherited Members
Properties
Info
Gets the plugin metadata
PluginInfo Info { get; }
Property Value
Methods
GetActionProviders()
Gets the action providers for Start menu integration using the reflection-free pattern.
IReadOnlyList<IPluginActionProvider> GetActionProviders()
Returns
- IReadOnlyList<IPluginActionProvider>
A list of action providers, or empty if the plugin provides no actions
GetControls()
Gets the control factories provided by this plugin
IReadOnlyList<PluginControl> GetControls()
Returns
- IReadOnlyList<PluginControl>
A list of control factories, or empty if the plugin provides no controls
GetServicePlugins()
Gets the service plugins provided by this plugin using the reflection-free pattern. Service plugins implement IPluginService and can be invoked without shared interfaces.
IReadOnlyList<IPluginService> GetServicePlugins()
Returns
- IReadOnlyList<IPluginService>
A list of service plugins, or empty if the plugin provides no services
GetServices()
Gets the services provided by this plugin (legacy type-based pattern). This method is obsolete. Override GetServicePlugins() instead.
[Obsolete("Use GetServicePlugins() instead. This type-based pattern will be removed in a future version.")]
IReadOnlyList<PluginService> GetServices()
Returns
- IReadOnlyList<PluginService>
A list of services, or empty if the plugin provides no services
GetThemes()
Gets the themes provided by this plugin
IReadOnlyList<PluginTheme> GetThemes()
Returns
- IReadOnlyList<PluginTheme>
A list of themes, or empty if the plugin provides no themes
GetWindows()
Gets the window/dialog factories provided by this plugin
IReadOnlyList<PluginWindow> GetWindows()
Returns
- IReadOnlyList<PluginWindow>
A list of window factories, or empty if the plugin provides no windows
Initialize(ConsoleWindowSystem)
Called when the plugin is loaded, before Get* methods are called. Use this for any initialization that requires access to the window system.
void Initialize(ConsoleWindowSystem windowSystem)
Parameters
windowSystemConsoleWindowSystemThe window system that loaded the plugin