Exporting non Exportable types

2010/10/30

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 (like Export) to...

Testing and Debugging MEF, avoiding misconceptions – Part 3

2010/10/29

Testing and Debugging MEF, avoiding misconceptions - Part 3 this is the 3rd post of this series and it will discuss common misconceptions which may lead unexpected behavior and long debugging nights.   Initialization issues the first misconception occurs when developer are trying to access imported property at construction time. NullReferenceException public class MyPlugin {     public MyPlugin()     {   // the logger import doesn't satisfied yet         // the next line will result with NullReferenceException         Logger.Write("MyPlugin initialized");     }            public ILogger Logger { get; set;...

The hidden assumption of EF 4 self-tracking entity

2010/10/20

The hidden assumption of EF 4 self-tracking entity recently I was diving into the Entity Framework self-tracking entity T4 and its generated code. doing so I was finding some interesting assumptions made about the entity behaviors. this post will illuminate some of those assumptions.   Background EF self tracking entity is one of the major enhancement of EF 4.0, it is a disconnected model (similar to the old DataSet) which enable tracking the entity state (Added, Modified, Deleted and Unchanged) while the...
no comments

Testing and Debugging MEF, Tips – Part 2

2010/10/12

Testing and Debugging MEF, Tips - Part 2 this is the second post of a series that will offer some tips about testing and debugging your MEF-able component and application.   in this post we will focus about debugging the most common, and most confusing, MEF failure.   Assembly Loading Failure the most common MEF runtime failure occurs because of missing assembly which contain the MEF parts (Import, Export) or the parts dependencies (like 3rd party components).   under the hood MEF is using...
no comments