Table of Contents

Interface IPluginManager

Namespace
Whim
Assembly
Whim.dll
Manager for the loaded plugins.
public interface IPluginManager : IDisposable
Inherited Members

Properties

LoadedPlugins

The currently loaded plugins.
IReadOnlyCollection<IPlugin> LoadedPlugins { get; }

Property Value

IReadOnlyCollection<IPlugin>

Methods

AddPlugin<T>(T)

Adds a plugin, registers its commands and keybinds from PluginCommands.
There is no guarantee that PreInitialize() will be called before Whim is initialized. However, PostInitialize() will still be called after PreInitialize().
T AddPlugin<T>(T plugin) where T : IPlugin

Parameters

plugin T
The plugin to add.

Returns

T
The plugin that was added.

Type Parameters

T

Contains(string)

Whether the plugin manager includes a plugin with the given name.
bool Contains(string pluginName)

Parameters

pluginName string
The name of the plugin.

Returns

bool
Whether the plugin manager includes a plugin with the given name.

PostInitialize()

Performs the following:
  1. Calls PostInitialize() for all plugins.
  2. Loads the state of all plugins from LoadState(JsonElement), from the last JSON saved state.
void PostInitialize()

PreInitialize()

Calls all plugins' PreInitialize() method. This runs before the rest of the context has been initialized.
void PreInitialize()

SaveState()

Saves the state of all plugins to a JSON file.
void SaveState()