Table of Contents

Class PluginManager

Namespace
Ranorex.Core
Assembly
Ranorex.Core.dll

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

true if the default plugins have been loaded; otherwise, false.

Instance

The plugin manager instance.

public static PluginManager Instance { get; }

Property Value

PluginManager

LoadedPlugins

The loaded plugins.

public IDictionary<string, Plugin> LoadedPlugins { get; }

Property Value

IDictionary<string, Plugin>

SuppressLoadingOfDefaultPlugins

Gets or sets a value specifying whether the loading of the default plugins is suppressed.

public bool SuppressLoadingOfDefaultPlugins { get; set; }

Property Value

bool

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

plugin Plugin

An uninitialized plugin instance.

Exceptions

ArgumentNullException

If plugin is null.

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

assemblyPath string

The 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

assemblyPath string

The file name of the assembly which contains the plugin(s).

typeName string

The full type name of the plugin to load or null to 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

pluginType Type

The 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

directory string

The 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

args PluginLoadedEventArgs

The PluginLoadedEventArgs instance containing the event data.

Events

PluginLoaded

Occurs when a plugin is loaded.

public event PluginLoadedEventHandler PluginLoaded

Event Type

PluginLoadedEventHandler