Table of Contents

Class PluginBase

Namespace
SharpConsoleUI.Plugins
Assembly
SharpConsoleUI.dll

Base class for plugins with default empty implementations. Inherit from this class and override only the methods you need.

public abstract class PluginBase : IPlugin, IDisposable
Inheritance
PluginBase
Implements
Derived
Inherited Members

Properties

Info

Gets the plugin metadata

public abstract PluginInfo Info { get; }

Property Value

PluginInfo

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public virtual void Dispose()

GetActionProviders()

Gets the action providers for Start menu integration using the reflection-free pattern.

public virtual 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

public virtual 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.

public virtual 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.

public virtual 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

public virtual 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

public virtual 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.

public virtual void Initialize(ConsoleWindowSystem windowSystem)

Parameters

windowSystem ConsoleWindowSystem

The window system that loaded the plugin