Anvil
Anvil.Plugins.PluginManager Class Reference

Loads all available plugins and their types for service initialisation. More...

+ Inheritance diagram for Anvil.Plugins.PluginManager:
+ Collaboration diagram for Anvil.Plugins.PluginManager:

Public Member Functions

string? GetPluginDirectory (Assembly pluginAssembly)
 Gets the install directory of the specified plugin. More...
 
bool IsPluginAssembly (Assembly assembly)
 Gets if the specified assembly is the primary assembly for a plugin. More...
 
bool IsPluginLoaded (string pluginName)
 
Assembly? ResolveDependency (string pluginName, AssemblyName dependencyName)
 

Detailed Description

Loads all available plugins and their types for service initialisation.

Member Function Documentation

◆ GetPluginDirectory()

string? Anvil.Plugins.PluginManager.GetPluginDirectory ( Assembly  pluginAssembly)
inline

Gets the install directory of the specified plugin.

Parameters
pluginAssemblyThe assembly of the plugin, e.g. typeof(MyService).Assembly
Returns
The install directory for the specified plugin.
Exceptions
ArgumentExceptionThrown if the specified assembly is not a plugin.

◆ IsPluginAssembly()

bool Anvil.Plugins.PluginManager.IsPluginAssembly ( Assembly  assembly)
inline

Gets if the specified assembly is the primary assembly for a plugin.

Parameters
assemblyThe assembly to query.
Returns
True if the assembly is a plugin, otherwise false.

The documentation for this class was generated from the following file: