How to get module name from module code?

Topics: Prism v2 - Silverlight 2
Mar 2, 2009 at 3:34 PM
Hi,

Is it possible to get module name from module code?

Thanks,
Alexey Zakharov.
Developer
Mar 9, 2009 at 4:15 AM

You could retrieve the IModuleCatalog service and find the module name by finding the ModuleInfo with the matching type.  If you're doing this from your module initialization, you should be able to use the GetType():

var moduleInfo = _catalog.GetCoreGroups().SelectMany(g => g.Modules)
.First(m => m.ModuleType.Contains(
this.GetType().Name));

 

 

-b

Mar 9, 2009 at 5:15 AM
Thanks!