Interface IPluginManager
The IPluginManager manages all plugins.
Inherited Members
Namespace: Snowflake.Services
Assembly: Snowflake.Framework.Primitives.dll
Syntax
public interface IPluginManager : IDisposable, IEnumerable<IPlugin>, IEnumerable
Methods
Get(String)
Gets a specific provisioned plugin
Declaration
IProvisionedPlugin Get(string pluginName)
Parameters
Type | Name | Description |
---|---|---|
System. |
pluginName | The name of the plugin. |
Returns
Type | Description |
---|---|
IProvisioned |
The given plugin if it exists, null if it does not. |
Get<T>()
Gets all plugins registered under the type category
Declaration
IEnumerable<T> Get<T>()
where T : class, IPlugin
Returns
Type | Description |
---|---|
System. |
All plugins registered under a specific category. |
Type Parameters
Name | Description |
---|---|
T | The plugin type category to register under. |
Get<T>(String)
Gets a specific plugin registered under a given type category
Declaration
T Get<T>(string pluginName)
where T : class, IPlugin
Parameters
Type | Name | Description |
---|---|---|
System. |
pluginName | The name of the plugin. |
Returns
Type | Description |
---|---|
T | The given plugin if it exists, null if it does not. |
Type Parameters
Name | Description |
---|---|
T | The plugin type category to register under. |
GetCollection<T>()
Gets all plugins registered under the type category as a plugin collection.
Declaration
IPluginCollection<T> GetCollection<T>()
where T : class, IPlugin
Returns
Type | Description |
---|---|
IPlugin |
All plugins registered under a specific category. |
Type Parameters
Name | Description |
---|---|
T | The plugin type category to register under. |
GetProvision<T>(IModule)
Provisions a IProvisioned
Declaration
IPluginProvision GetProvision<T>(IModule module)
where T : class, IPlugin
Parameters
Type | Name | Description |
---|---|---|
IModule | module | The module the plugin is loaded from |
Returns
Type | Description |
---|---|
IPlugin |
A provision used to initialize an IProvisioned |
Type Parameters
Name | Description |
---|---|
T | The Type of the plugin |
IsRegistered(String)
Checks if a given plugin has been loaded into the plugin manager.
Declaration
bool IsRegistered(string pluginName)
Parameters
Type | Name | Description |
---|---|---|
System. |
pluginName | The name of the plugin. |
Returns
Type | Description |
---|---|
System. |
True if the plugin has been registered. |
IsRegistered<T>(String)
Checks if a given plugin under a type category has been loaded into the plugin manager.
Declaration
bool IsRegistered<T>(string pluginName)
where T : class, IPlugin
Parameters
Type | Name | Description |
---|---|---|
System. |
pluginName | The name of the plugin. |
Returns
Type | Description |
---|---|
System. |
True if the plugin has been registered. |
Type Parameters
Name | Description |
---|---|
T | The plugin type category to register under. |
Register<T>(T)
Registers a plugin with the plugin manager.
Declaration
void Register<T>(T plugin)
where T : class, IPlugin
Parameters
Type | Name | Description |
---|---|---|
T | plugin | The plugin instance |
Type Parameters
Name | Description |
---|---|
T | The plugin type category to register under. |