0

I am using DirectoryModuleCalatog to load the modules.

What I am trying to implement is all the modules needs to be dependent on some specific module. For example, I have one MainModule and several orher modules, what I want is all my modules are dependent on MainModule.

We can do this by specifying ModuleDependency attribute, but my requirement is even if module don't have this attribute, the dependency can be set through code.

I have checked various forims and found that this can be achieved if I am populate ModuleCatalog direct from code. I can Implement this by directly traversing the modules location but not sure how it could impact on performance if number of modules are more (say 50+ or 100+).

Is it possible to set the module dependency if catalog is populated using DirectoryModuleCatalog?

Ashish Sharma
  • 357
  • 2
  • 5
  • 16
  • 1
    This is confusing, you can do it through the attribute as you mentioned, but you don't want to do that... You said you want to get it "through the code", but from where do you get the dependency information? I would need to know. You can also look at the source code, provided by Prism, for the DirectoryModule catalog and create your own DirectoryCatalog with additional functionality, retrieving those dependencies from wherever you do. – Alan Oct 30 '12 at 23:06
  • Hi Alan, thanks for your reply. As I mentioned that I can do it by directly traversing the modules location but I am not sure about the performance if number of modules are 50+ or so. BTW, thanks for pointing me to have a look on source code for PRISM, I will try to implement the functionality there and see if that could resolve my problem. – Ashish Sharma Oct 31 '12 at 07:21
  • How did your investigation go? – Gareth Oates Dec 14 '15 at 15:03

0 Answers0