Tag Archives: MEF



Fav 3 : Three Favorite .NET Tips and Tricks from Daily .NET Tips – Series 6

Here is the sixth post of the Fav 3 series that we are continuing.  Today’s favorite tips are based on Managed Extensibility Framework or MEF. #1 Working with Catalogs in MEF TypeCatalog, AssemblyCatalog, DirectoryCatalog & AggreagateCatalog are the four types of Catalogs yet supported by MEF. This tips talks about how to use different types of catalogs […]

Use of ImportConstructor to inject Constructor code in MEF

Just like what I have talked for so long in my blog entries about Import, ImportConstructor is another attribute that you can annotate only for a constructor. Sometimes it is needed to have some kind of Dependency that needs to be injected while constructing the object.  In case of a normal Import, the Property is […]

Working with CompositionBatch in MEF

CompositionBatch is a new type introduced with MEF library that allows you to individually deal with Part instances. Generally when we are in a situation that we need to manually handle certain type, or more precisely when we need to create the types manually ourselves, it is recommended to use CompositionBatch. Basically you thing think […]

Working with DirectoryCatalog in MEF

As I have already discussed some of the Catalogs present in MEF library viz, TypeCatalog, AssemblyCatalog etc, where AssemblyCatalog is actually a collection of TypeCatalog internally, DirectoryCatalog on the other hand is a collection of AssemblyCatalog. In this post I will look into DirectoryCatalog and how to use this class while writing your MEF application. […]