Jul 7, 2011 at 3:48 PM
Edited Jul 7, 2011 at 3:49 PM
In scenarios where manually loading two modules using IModuleManager.LoadModule
void OnPermissionsLoaded(Permission p)
In case there are dependent modules defined in the module-catalog they will be loaded as well and the LoadModuleCompleted event will be raised for each module and module.
In case a dependent module is being loaded and we get the LoadModuleCompleted event for it, in the EventArgs there is no info about the origin module that we called in ModuleManager.LoadModule for.
Another behavior of ModuleManager, if a dependent module failed to load, the entire module loading is stopped (make sense).
When two module-loading are done in parallel and one of them failed since its dependent module failed to load, there is no way to know to which origin module that we tried to load, the failure relates to.
This prevent to correctly perform any custom handling in the application for each module.
Problem in practice
When trying to extend Prism so region navigation will integrate with on-demand module-loading, it became more meaningful, since when navigating (INavigateAsync.RequestNavigate)
you expect to call the navigationCollback supplied delegate when navigation either failed or done, but since parallel module-loading failure cannot be correlated to the initiating navigation/module-load, it breaks.
Any solutions advices?