Class PluginManager
The singleton which manages the Ranorex Core plugins.
public class PluginManager : MarshalByRefObject
- Inheritance
-
PluginManager
- Inherited Members
Properties
DefaultPluginsLoaded
Gets a value indicating whether the default plugins have been loaded.
public bool DefaultPluginsLoaded { get; }
Property Value
- bool
trueif the default plugins have been loaded; otherwise,false.
Instance
The plugin manager instance.
public static PluginManager Instance { get; }
Property Value
LoadedPlugins
The loaded plugins.
public IDictionary<string, Plugin> LoadedPlugins { get; }
Property Value
SuppressLoadingOfDefaultPlugins
Gets or sets a value specifying whether the loading of the default plugins is suppressed.
public bool SuppressLoadingOfDefaultPlugins { get; set; }
Property Value
Remarks
Whenever the ElementEngine is accessed, the default plugins are loaded
(if not already loaded, see LoadDefaultPlugins()). If you want to suppress this behavior,
set this property to true before accessing the ElementEngine the first time.
Methods
Load(Plugin)
Loads the specified plugin instance.
public void Load(Plugin plugin)
Parameters
pluginPluginAn uninitialized plugin instance.
Exceptions
- ArgumentNullException
If
pluginisnull.- RanorexCoreException
If a plugin with the same name is already loaded or initializing the plugin fails.
Load(string)
Loads all plugins from a given assembly.
public int Load(string assemblyPath)
Parameters
assemblyPathstringThe file name of the assembly which contains the plugin.
Returns
- int
The number of newly loaded plugins.
Exceptions
- RanorexCoreException
If the assembly cannot be found.
Load(string, string)
Loads plugins from an assembly.
public int Load(string assemblyPath, string typeName)
Parameters
assemblyPathstringThe file name of the assembly which contains the plugin(s).
typeNamestringThe full type name of the plugin to load or
nullto load all plugins in the assembly.
Returns
- int
The number of newly loaded plugins.
Exceptions
- RanorexCoreException
If the assembly or type cannot be found or if loading a plugin type fails.
Load(Type)
Instantiates and loads the specified plugin type.
public void Load(Type pluginType)
Parameters
pluginTypeTypeThe type of a plugin.
Exceptions
- RanorexCoreException
If instantiating the type or loading the instantiated plugin fails.
LoadDefaultPlugins()
Performs the default steps for loading Ranorex plugins.
public void LoadDefaultPlugins()
Remarks
The default plugins will be only loaded once even if this method is called several times.
LoadPluginsFromDirectory()
Loads plugins from the directory of the currently executing assembly.
public int LoadPluginsFromDirectory()
Returns
- int
The number of plugins loaded successfully.
LoadPluginsFromDirectory(string)
Loads plugins from the specified directory.
public int LoadPluginsFromDirectory(string directory)
Parameters
directorystringThe path of the directory to load plugins from.
Returns
- int
The number of plugins loaded successfully.
OnPluginLoaded(PluginLoadedEventArgs)
Raises the PluginLoaded event.
protected virtual void OnPluginLoaded(PluginLoadedEventArgs args)
Parameters
argsPluginLoadedEventArgsThe PluginLoadedEventArgs instance containing the event data.
Events
PluginLoaded
Occurs when a plugin is loaded.
public event PluginLoadedEventHandler PluginLoaded