. Introduction to the MEF (Managed Extensibility Framework) architecture under NET4

Source: Internet
Author: User
Tags hosting

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.