This project has moved and is read-only. For the latest updates, please go here.

Easier TypeCatalog

Dec 28, 2011 at 6:49 PM

I've got confused when using MEF2 framework and hopefully this will help others if they get to the same problem.
I've read about the new RegistrationBuilder which allow to use "register by convention" way. The nice thing there is that I don't have to put ExportAttribute all over my types.

I've got confused when try to use TypeCatalog by to create a catalog of types which do not have Export attribute on them. I fail to realize I have to either have Export attribute or pass a RegistrationBuilder to the TypeCatalog.

It will be handy to have something like TypeCatalog to which I can pass types that I want to have in the catalog without the need to create RegistrationBuilder for them. I can think of corner cases like multiple ctors which may pose difficulty but maybe it worth thinking about.

Thank you,


Dec 28, 2011 at 6:54 PM

Hi Ido,

In the new ASP.NET MVC integration, we include a type called MvcApplicationCatalog. The catalog is loosely based on AssemblyCatalog, and by default defines some conventions around the "Parts" namespace.

The approach taken with MvcApplicationCatalog might be along the lines you are looking for - with all of the MVC-specific functionality removed, of course. Thoughts?



Dec 28, 2011 at 7:28 PM

Yes, this seem like the right way.


Thank you,