當在棱鏡/ WPF設置模塊,使用棱鏡模塊化:什麼是moduleType(和moduleName)?
<section name="modules" type="Microsoft.Practices.Prism.Modularity.ModulesConfigurationSection, Microsoft.Practices.Prism"
...有app.config文件中,在這裏你可以添加每個模塊,這樣的部分:
<module assemblyFile="MyCompany.ABC.Client.Module.OutlookBar.dll"
moduleType="MyCompany.ABC.Client.Module.OutlookBarModule.OutlookBarModule,
MyCompany.ABC.Client.Module.OutlookBar" moduleName="OutlookBarModule"
startupLoaded="true"/>
此代碼有效,但我真的很想知道更多關於moduleType屬性的信息。它由什麼組成?
起初我以爲是namespace.classname + comma + namespace。 (即完全合格的類名,命名空間(無類名)
但圍繞在我的OutlookBar「主類」的命名空間被命名爲這樣的: MyCompany.ABC.Client.Module.OutlookBarModule 和它的類名是「OutlookBarModule」
那麼...... moduleType定義的第二部分(在逗號後面)???我找不到這個名稱(「MyCompany.ABC.Client.Module.OutlookBar 「)在我的代碼中,除了程序集名稱外。
此致敬意, Andreas
我的問題標題表明我也有一個關於moduleName的問題,但我忘了寫這個問題。我在另一個地方發現,「默認情況下,當未指定模塊名稱時,類名稱將用作模塊名稱」。這可能是正確的。 – 2012-01-10 12:44:05