Posts under MEF

Managed Extensibility Framework – Part 3 : Importing Constructor

It’s MEF time again! This time I am going to discuss a little bit about the ImportConstructor attribute. As the name of the attribute suggests, it is used to “import” dependencies in to constructor parameters. Consider the following snippet which demonstrates this. Code listing: ComplexOp implements the IComplexOp contract. The constructor for ComplexOp “imports” the [...]

Managed Extensibility Framework – Part 2 : Metadata

I am back with more MEF! This time I am discussing about metadata that could provide additional information about components the implement contracts. These entries about MEF are more of the “journal” kind rather than a “tutorial”. To provide metadata you just need to use the ExportMetadata attribute. There are two possible ways by which [...]

A Refresher/Crash Course on MEF!

Here I am with another post! This is supposed to be a crash course or a refresher (call it whatever you want!) on MEF (Managed Extensibility Framework). Consider the following gist. In order to create a fairly simple yet meaningful application that demonstrates MEF, you need 3 projects within a solution. Obviously, this is not [...]