开发者

C# Prism Composite Application module loading

开发者 https://www.devze.com 2023-04-12 00:46 出处:网络
Is there a natural way to register modules within a module for the composite application pattern in prism?

Is there a natural way to register modules within a module for the composite application pattern in prism?

Say we have a module A in a prism WPF application which needs to load and register modules A1,A2,...,An.

It seems to me that the approach to register all the "nested" modules A1 to An in the bootstrapper is a "dirty" one, since these modules belong to module A logically.

Should one load开发者_C百科 A1 to An manually in the Initialize() method of A or is there a more natural approach which fits well in the general module pattern?


if A1..An are composable or sharable they should be loaded by bootstrapper so other modules could use it. If only module A will use them i think the best idea is not to treat them like prism modules, because they (probably) are used only to implement functionality of module A and aren't modular pieces of software you're building.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号