I am currently working on using MEF to scan / link extensions for my applications. I would like to change the default creation policy to not general (instead of general), but have it so that the creation policy is redefined through attributes. In other words, if I do not specify a creation policy for export, I want MEF to use non-generic ones.
My previous implementation no longer works for me, because it changes the required creation policy for all imports. Therefore, if I override the creation policy, the export is not linked.
I searched around and closest I was able to get a new RegisrationBuilder, but I am working with .NET 4 (so MEF 1) in VS2010. I also could not find a way with ExportProviders.
Any help is appreciated; thanks in advance!
source share