Can you activate the Prism modular system from the WCF service? Because no matter what I do, my MEF dependencies are not fulfilled.
eg:.
This is my implementation of WCF service
public class MyService : IMyServiceContract{
This is my MEF flavor prismatic accelerator :
public class MyServiceBoostrapper : MefBootstrapper { protected override void ConfigureContainer() { base.ConfigureContainer(); } protected override IModuleCatalog CreateModuleCatalog() { return new ConfigurationModuleCatalog(); } protected override void ConfigureAggregateCatalog() { base.ConfigureAggregateCatalog();
Here is my module containing the interfaces for the Prism database service :
[ModuleExport(typeof(IDatabase))] public class ModuleActivator : IModule { public void Initialize() {
and finally, this is the Prism database service :
[ModuleExport(typeof(DatabaseImpl), DependsOnModuleNames = new string[] { "IDatabase" })] public class ModuleActivator : IModule { public void Initialize() {
Tried this for the last few hours without success. My db import is always null and never initialized.
Please note that everything works if I do all this without Prism, but only with MEF.
drozzy
source share