Browse by Tags
All Tags »
MEF (
RSS)
MEF 2.0 - mini series: part 8 (Composition options and exception handling) this is the last post in the MEF 2.0 mini series. you can see other posts of this series in here . this post will wrap-up the series with a quick survey to to the to some changes made for the underline composition process. Exception one of the most painful experience of MEF 1 was its misleading exception's description . some time it was really hard to figure out the exception roots. you can read more about MEF 1...
MEF 2.0 - mini series: Part 7 (Catalog filter and Deep hierarchic scoping) this is the 7th post in the MEF 2.0 mini series. you can see the following TOC for other posts in this series. in the previous post I was talking about composition scoping and lifetime management. on this one, I will extend the composition scoping topic toward hierarchic along with catalog filtering capability. hierarchic scoping is not trivial, you must understand the hierarchic behavior and what it was design for. MEF hierarchic...
This Week On Channel 9 my blog was manage to get on Channel 9 week's top developer news .
MEF 2.0 - mini series: part 6 (Composition scoping and lifetime management) this is the 6th post in the MEF 2.0 mini series. you can see the following TOC for other posts in this series. in this post I will cover a new concept of scoping and part lifetime management , which is a great improvement over MEF 1. MEF 1 was coming with a fairly naïve lifetime management . part's lifetime could be either shared or non-shared ( you could also apply 'any' but eventually 'any' will be created...
MEF 2.0 - mini series: part 5 (Fluent export properties) this is the 5th post in the MEF 2.0 mini series. you can see the following TOC for other posts in this series. in this post I will cover the fluent property's export . Exporting properties is a less known feature of MEF . MEF 1 was supporting this feature by using the attribute model. you could decorate a property with a [Export] attribute and then it become available for imports. the following code demonstrate property exporting in MEF...
MEF 2.0 - mini series: part 4 (Fluent Import) this is the 4th post in the MEF 2.0 mini series. you can see the following TOC for other posts in this series. in this post I will discuss the Fluent import API . we was talking about Fluent Export and Constructor Injection in the previous posts. this post will complete the main scenarios of Import's fluent API . I will demonstrate the import technique using the following classes: Code Snippet public class Foo { public Logger Log { get ; set ; } ...
MEF 2.0 - mini series: part 3 (Fluent import constructor) this is the 3rd post in the MEF 2.0 mini series. you can see the following TOC for other posts in this series. in this post I will discuss the fluent constructor injection API . Constructor Injection the following code is having a Logger and Worker class which is having 2 constructor (one has no parameters and the other is getting ILogger ): Code Snippet public class Logger : ILogger { public void Write( string message) { /* ... */} } public...
MEF 2.0 - mini series: part 2 (Fluent and Conventional Export) this is the second post in the MEF 2.0 mini series. you can see the following TOC for more. in this post I will start to cover the fluent discovery model and the idea of discovery by convention . traditionally , out of the box, MEF come with a single discovery model , which was the Attribute model . it is true that you could extend MEF's discovery model by using either a custom catalog or a custom export provider , but this task wasn't...
MEF 2.0 TOC MEF 2.0 is a reflection of a community requests. features like Open Generics , fluent and conventional discovery , lifetime handling of the part , better exception handling and more, was all requested by the community. part 1: Open Generics Part 2: Fluent and Conventional Export Part 3: Fluent import constructor Part 4: Fluent import Part 5: Fluent export properties. Part 6: Composition scoping and lifetime management Part 7: Catalog filter and Deep hierarchic scoping. Part 8: Composition...
MEF 2.0 - mini series: part 1 (Open Generics) this is the first post of a new mini series about MEF 2.0 . MEF 2.0 is a reflection of a community requests. features like Open Generics , fluent and conventional discovery , lifetime handling of the part , better exception handling and more, was all requested by the community. each post of this mini series will target a single enhancement. Open Generics one of the most annoying missing feature in MEF 1 was the lack of support for Open generics. the following...
MEF - Best Practice In this post I will offer MEF practice that may ease your MEF life . one of the MEF headache is to understand what's goes wrong, when MEF reject the composition , you can read more about MEF diagnostic in this post. Most of the obscure loading failure happens when your Export dependencies doesn't satisfied . in those case you solely relay on the MEF error message which is not enough in cases of deep dependencies graph. It will normally occurs when you are...
SDP - MEF (Real-Life patterns) On the last day of the SDP at Crown Plaza Hotel, Tel Aviv. I was lecturing about Real-Life scenario of MEF failures . the lecture was focusing on diagnostic , solutions and testing . I want to thanks all attendant's, It was the after lunch session and you were bravely kept your eyes open. the presentation pdf can be found here . you can use the following check-list as recommended diagnostic process . Diagnostic Check-List Is the instance included...
SELA Group was having a live broadcast on the SDP conference content, if you happens to be at Israel at between the 13-16.3 and considering to attend the conference, the on demand recording can help you to choose which session best suit you . the SDP agenda site: http://www.sela.co.il/s/sdp/_new/practice2011.html my talk about the Parallel tutorial day and MEF session: http://scc.sela.co.il/scc/pages/showlecture/showlecture.aspx?lectureid=487 .
Dynamic MEF isn't thread safe by nature this post focus a pitfall which you should be aware in order to avoid sporadic crashes. In general most of MEF operation are operate once at the application initialization stage, and it normally happens on a single thread. this may not be true when you need to dynamically load MEF parts (using GetExportedValue or SatisfyImportsOnce ). unfortunately MEF underline is using non concurrent dictionary which is not thread safe for the above operation...
Exporting non Exportable types this post extend Glenn Block 's post about " Poco, Mef, and custom type systems. Are you ready to take the red pill?" the post is adding a compile time attribute export model , Directory catalog and migrate Glenn code to VS 2010 . It is very recommended to read Glenn Block 's post before reading this one. the code sample for this post can be download from here . Summarizing Glenn's post in general Glenn show how to add attributes...
More Posts
Next page »