MEF中的目錄Catalog

2021-06-10 08:14:31 字數 755 閱讀 1191

基類

composablepartcatalog

public

abstract

class composablepartcatalog : ienumerable, ienumerable, idisposable

system.object

system.componentmodel.composition.primitives.composablepartcatalog

system.componentmodel.composition.hosting.aggregatecatalog

system.componentmodel.composition.hosting.assemblycatalog

system.componentmodel.composition.hosting.compositionscopedefinition

system.componentmodel.composition.hosting.directorycatalog

system.componentmodel.composition.hosting.filteredcatalog

system.componentmodel.composition.hosting.typecatalog

private readonly iwindowmanager _windowmanager;

[importingconstructor]

MEF 程式設計指南(八) 過濾目錄

var catalog new assemblycatalog typeof program assembly var parent new compositioncontainer catalog var filteredcat new filteredcatalog catalog,def de...

MEF 程式設計指南(七) 使用目錄

目錄 catalogs mef 特性程式設計模型的核心價值,擁有通過目錄動態地發現部件的能力。目錄允許應用程式輕鬆地使用那些通過 export attribute 註冊自身的匯出。下面列出 mef 提供的目錄。程式集目錄 assembly catalog 為了發現給定程式集所有匯出,需要使用 sys...

MEF系列一 應用程式中的宿主MEF

在應用程式中宿主mef包含建立組合容器物件 compositioncontainer 向組合容器物件新增可組合部件 parts 包含應用程式宿主本身,最後進行組合。下面是關於宿主的步驟 1 建立乙個宿主類,在本例中我們使用乙個控制台程式,所以宿主就是program類。2 新增引用 system.co...