Skip to content
This repository has been archived by the owner on Sep 4, 2024. It is now read-only.

The Add in Registry

slluis edited this page Nov 20, 2014 · 3 revisions
Home > Programming Guide > The Add in Registry

Mono.Addins keeps all information about add-ins in a Registry. The add-in engine uses this registry to get information about existing add-ins and the extensions those implement. Queries on the add-in registry are fast and can be done without having to load the actual add-ins, saving time and memory in the host application. The add-ins are loaded only when objects instances or resources need to be loaded.

The location of the add-in registry can be specified when initializing the add-in engine. For example:

AddinManager.Initialize ("[ApplicationData]/MyApplication")

The path provided as parameter to Initialize can be:

  • A relative or absolute path
  • A path relative to a known system folder. Known system folders can be specified by enclosing them in brackets. So in the example, [ApplicationData] is going to be replaced by the value of Environment.SpecialFolder.ApplicationData.

The registry can be updated by an application by this call:

AddinManager.Registry.Update();

The registry has information about the location of every add-in and a timestamp of the last check, so the Update method will only scan new or modified add-ins. An application might add a call to AddinManager.Registry.Update() in the Main method to detect all new add-ins every time the app is started. Every add-in added to the registry is parsed and validated, and if there is any error it will be rejected.

The registry can also be updated by running the add-in setup tool (mautil).

Next topic: Addin Discovery

Clone this wiki locally