Optional Modules

By using optional modules, and add-in can declare extensions which will be registered only if some specified add-in dependencies can be satisfied.

A module is declared using the Module element:

<Addin>
	...
	<Module>
		<Dependencies>
			...
		</Dependencies>
		<Runtime>
			...
		</Runtime>
		<Extension ...>
			...
		</Extension>
		...
	</Module>
</Addin>

Where:
  • /Addin/Module: Is the declaration of a module. An add-in can contain several optional modules.
  • /Addin/Module/Dependencies: Dependencies that must be satisfied in order for the extensions of this module to be loaded.
  • /Addin/Module/Runtime: Allows declaring assemblies and files to be loaded if the module is active.
  • /Addin/Module/Extension: Extensions to be loaded when the module is active.

The rules explained in the previous sections for specifying dependencies, runtime files and extensions can also be applied for modules.

Last edited May 10, 2010 at 11:41 PM by slluis, version 1

Comments

No comments yet.