PluginHost

Defines a base class for an IPlugin that can host other IPlugins. A PluginHost is a Plugin and has a PluginManager that it uses to load additional plugins from a provided target location after initialization.

PluginHost is an abstract class and inherits from Plugin.

Constructors

protected PluginHost(string name);
Initializes a new instance of the PluginHost class. The PluginHost initializes a PluginManager and attaches to its PluginLoadedEvent and PluginUnloadedEvent.
  • name - The plugin name.

Properties

protected PluginManager PluginManager { get; set; }
Gets or sets the collection of plugins this host contains.

Methods

public void Load(string path);
Loads all plugins from the selected path matching this hosts criteria.
  • path - The directory or file path to request.

public void Unload(string key);
Unloads the plugin related to the key.
  • key - The key of the plugin to unload.

Methods: Abstract

protected abstract void PluginLoaded(IPlugin plugin);
Implemented by an inheriting class to handle actions that should be performed when a plugin has been loaded by the host.
  • plugin - The loaded plugin.

protected abstract void PluginUnloaded(IPlugin plugin);
Implemented by an inheriting class to handle actions that should be performed when a plugin has been unloaded by the host.
  • plugin - The unloaded plugin.

Last edited Mar 19, 2013 at 5:09 PM by jsaundea, version 3

Comments

No comments yet.