Difference between revisions of "HowTo:Create UBIK Plugin"
Line 2: | Line 2: | ||
== Basic Prerequisites == | == Basic Prerequisites == | ||
− | If you want to create a | + | If you want to create a plugin which can be loaded into {{UBIK}} you have to include references to |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
* System.ComponentModel.Composition | * System.ComponentModel.Composition | ||
* UBIK.Injection | * UBIK.Injection | ||
+ | {{UBIK}} Injection Management provides access to all the basic features used by the Kernel to identifiy and categorize the available plugins. This management is provided by a library called '''UBIK.Injection'''. | ||
== Interface UBIK.Injection.IUbikPlugin == | == Interface UBIK.Injection.IUbikPlugin == |
Revision as of 09:17, 19 March 2015
UBIK® Plugins are dynamically loaded into the UBIK® Kernel using the Microsoft Extensibility Framework (MEF).
Contents
Basic Prerequisites
If you want to create a plugin which can be loaded into UBIK® you have to include references to
- System.ComponentModel.Composition
- UBIK.Injection
UBIK® Injection Management provides access to all the basic features used by the Kernel to identifiy and categorize the available plugins. This management is provided by a library called UBIK.Injection.
Interface UBIK.Injection.IUbikPlugin
Your plugin must implement the Ubik Plugin Interface. To register your plugin for MEF composition by defining the export contract via an Attribute.
[Export(typeof(UBIK.Injection.IUbikPlugin))]
public class myPlugIn : UBIK.Injection.IUbikPlugin
{
}
public class myPlugIn : UBIK.Injection.IUbikPlugin
{
}
MetaData
Ubik needs some Meta Information to manage plugins correctly. The available MetaInformation are defined by the interface UBIK.Injection.IUbikInjectionMetaData
Mandatory information
Name | Type | Description |
---|---|---|
ID | string | Unique ID of the Plugin |
Type | System.Type | Systemtype of the Plugin. Used for filtering the Plugins during loading. |
Optional information
Name | Type | Description |
---|---|---|
Name | string | Name of the plugin (for UI Presentation) |
Description | string | Name of the plugin (for UI Presentation) |
Version | int | Version of the plugin. As there are more plugins with the same ID, only the plugin with the highest Version is available. |
TargetApplication | PluginTargetApplication | Possibility to limit the plugin for a single type of application. |
MinimumKernelVersion | string | Minimum required Kernel version: Format x.x.x.x |
MinimumDatabaseVersion | string | Minimum required Database version: Format x.x.x.x |
Company | string | Information about the Company (for UI Presentation) |
Copyright | string | Copyright Information (for UI Presentation) |
Example:
[Export(typeof(UBIK.Injection.IUbikPlugin))]
[ExportMetadata("ID", "23B72354-A26F-449E-A7DA-F874B4167248")]
[ExportMetadata("Type", typeof(myPlugIn))]
[ExportMetadata("Name", "my Plugin")]
[ExportMetadata("Description", "does fancy things in version 2.4")]
[ExportMetadata("Version", 3)]
[ExportMetadata("MinimumKernelVersion", "2.4.0.0")]
[ExportMetadata("MinimumDatabaseVersion", "2.4.0.0")]
[ExportMetadata("Company", "Augmensys GmbH")]
[ExportMetadata("Copyright", "2014, Augmensys GmbH")]
public class myPlugIn : UBIK.Injection.IUbikPlugin
{
}
[ExportMetadata("ID", "23B72354-A26F-449E-A7DA-F874B4167248")]
[ExportMetadata("Type", typeof(myPlugIn))]
[ExportMetadata("Name", "my Plugin")]
[ExportMetadata("Description", "does fancy things in version 2.4")]
[ExportMetadata("Version", 3)]
[ExportMetadata("MinimumKernelVersion", "2.4.0.0")]
[ExportMetadata("MinimumDatabaseVersion", "2.4.0.0")]
[ExportMetadata("Company", "Augmensys GmbH")]
[ExportMetadata("Copyright", "2014, Augmensys GmbH")]
public class myPlugIn : UBIK.Injection.IUbikPlugin
{
}