Reprinted from http://zhoujg.blog.51cto.com/1281471/519269
In the previous article, WPF-.net 4.0 resolved the memory leak in the DataGrid grouping when it said that theOpenexpressapp was upgraded to a memory leak issue. NET4 platform, and then after the upgrade COMPOSITEWPF a bit of a problem. MEFwas previously considered in Openexpressapp's consideration of the dynamic extension component mechanism, but it was immature at the time, so COMPOSITEWPF was used, And now the MEF has become a. NET first citizen, COMPOSITEWPF has not provided. Net4 version, also a long time no upgrade, nor clear its direction of development, and now some memory leaks in the software is related to it, so simply use MEF as a plug-in mechanism. Here to put the two together, mainly from the dynamic expansion of components, they are actually not a thing, can coexist, here is not much to say, below I mainly introduce the MEF architecture, I hope that the overall understanding, After changing Openexpressapp I'll write an article about how to use MEF in Openexpressapp.
Main
Various export providers extract part information from the catalog and are then assembled by Compositioncontainer, each of which contains both import and export content.
Main composition diagram
It consists of a container, a base class library, and a property programming model, which is not much, and you must be familiar with what you want to enrich yourself.
Now I just want to use MEF instead of Prsim to implement plug-in expansion mechanism, because of the time constraints can not be further researched, so now is used in some of these classes, such as: Compositioncontainer, CompositionBatch, Assemblycatalog, Directorycatalog, and attribute tags, and so on, I'll change from Prsim to MEF in detail later.
Main class Diagram
Specific content can be consulted:
Hosting the. NET composition Primitives.pdf
Other
Reference blog:
A Crash Course on the MEF primitives
Mef:dependencies is Queries?
Hosting the. NET composition Primitives.pdf
Building composable applications using the Managed extensibility framework in. NET 4
Msdn-managed Extensibility Framework Overview
Project website:
Managed Extensibility Framework
Managed extensibility Framework Contrib
Openexpressapp framework of Open source information system development Platform 1.1 Spring Festival Flying Tiger Edition released
Welcome Reprint, Reproduced Please specify: Reproduced from Zhou Jingen [ http://zhoujg.cnblogs.com/ ]
This article is from the "Zhou Jingen" blog, make sure to keep this source http://zhoujg.blog.51cto.com/1281471/519269
. Introduction to the MEF (Managed Extensibility Framework) architecture under NET4