MEF2: Instance Registration

Dec 14, 2011 at 8:45 PM

It appears that your convention-based registration is designed to support IoC scenarios. One common feature of IoC containers is Instance Registration. Given that conventions are just rules attached to a catalog, is there any way to inject an instance into a container? If not, can you pass initialization code to a singleton when it is constructed?

Aug 23, 2012 at 11:32 AM


This is year old question but it still did not receive an answer.

Is this possible to do using RegistrationBuilder?


Thank you,


Oct 20, 2014 at 3:51 PM

Same question ... how do we register existing instances into the container?