Difference between revisions of "HowTo:Create UBIK Module"
m (→Interface: IUbikModule) |
(→Example) |
||
| (5 intermediate revisions by 2 users not shown) | |||
| Line 16: | Line 16: | ||
public class TestModule : UBIK.Injection.IUbikModule | public class TestModule : UBIK.Injection.IUbikModule | ||
{ | { | ||
| − | |||
} | } | ||
</source> | </source> | ||
| − | + | ||
=== Interface: IUbikInjectionMetaData === | === Interface: IUbikInjectionMetaData === | ||
| Line 70: | Line 69: | ||
= Example = | = Example = | ||
<source lang="csharp"> | <source lang="csharp"> | ||
| − | [Export(typeof(UBIK.Injection. | + | [Export(typeof(UBIK.Injection.IUbikPlugin))] |
[ExportMetadata("ID", "C149402E-BC86-46D6-8D1B-63C86894EA77")] | [ExportMetadata("ID", "C149402E-BC86-46D6-8D1B-63C86894EA77")] | ||
[ExportMetadata("Type", typeof(TestModule))] | [ExportMetadata("Type", typeof(TestModule))] | ||
| Line 83: | Line 82: | ||
public class TestModule : UBIK.Injection.IUbikModule | public class TestModule : UBIK.Injection.IUbikModule | ||
{ | { | ||
| + | public ISystemDefinitionProvider SystemDefinitionsProvider | ||
| + | { | ||
| + | get | ||
| + | { | ||
| + | return TestSysDefProvider.Instance; | ||
| + | } | ||
| + | } | ||
| + | public void Initialize(UBIKEnvironment environment) | ||
| + | { | ||
| + | } | ||
| + | |||
| + | public bool Initialized() | ||
| + | { | ||
| + | return true; | ||
| + | } | ||
| + | |||
| + | public void Terminate() | ||
| + | { | ||
| + | } | ||
| + | |||
| + | public List<ModuleInfo> DependencyModules | ||
| + | { | ||
| + | get; | ||
| + | } = new List<ModuleInfo>() | ||
| + | { | ||
| + | new ModuleInfo() | ||
| + | { | ||
| + | ID = Guid.Parse("A4FF45D7-20C7-451A-A58A-1001B5B1EA7B"), | ||
| + | Name = "MRO Plugin" | ||
| + | } | ||
| + | } | ||
} | } | ||
</source> | </source> | ||
| + | |||
| + | ==== To be implemented for IUbikModule ==== | ||
| + | {| class="wikitable" | width = "100%" | ||
| + | |- | ||
| + | ! Name !! Description | ||
| + | |- | ||
| + | | SystemDefinitionsProvider || The instance of the SystemDefinitions for the respective module is provided. | ||
| + | |- | ||
| + | | Initialize || Initializes the module. | ||
| + | |- | ||
| + | | Initialized || Returns true when the plugin is initialized | ||
| + | |- | ||
| + | | Terminate || Terminates the UBIKEnvironment if it has been initialized. | ||
| + | |- | ||
| + | | DependencyModules || Returns the module information for which it has a dependency. | ||
| + | |- | ||
| + | |} | ||
<headertabs /> | <headertabs /> | ||
| Line 91: | Line 138: | ||
== See also == | == See also == | ||
* [[Injection_Management]] | * [[Injection_Management]] | ||
| + | * [[HowTo:Provide_system_definitions_with_a_custom_plugin]] | ||
| + | * [[HowTo:Create_UBIK_Plugin]] | ||
[[Category:Injecting|Create UBIK Module]] | [[Category:Injecting|Create UBIK Module]] | ||
| + | [[Category:Module|Create UBIK Module]] | ||
| + | [[Category:Plugin|Create UBIK Module]] | ||
Latest revision as of 11:38, 24 October 2025
UBIK® Modules are loaded dynamically into the UBIK® Kernel by the UBIK® Injection Management based on the Microsoft Extensibility Framework (MEF).
