2

easy task, but couldn't find any direction.

i want to intercept object creation of MEF and return proxy (using castle dynamic proxy) of my object either then the object itself. is it possible to do that?

ktutnik
  • 6,882
  • 1
  • 29
  • 34

1 Answers1

2

There's no simple way to do this. You could write a custom programming model, or maybe create a TypeCatalog over your own Type object.

Daniel Plaisted
  • 16,674
  • 4
  • 44
  • 56
  • @ktutnik There might be a custom programming model on MefContrib that has support for this: http://github.com/MefContrib/MefContrib If you do make the hard way I'd suggest you submit it to MefContrib. – Daniel Plaisted Aug 07 '10 at 21:21
  • thanks.. i will check the link i hope someone already make one.. actually i found http://kozmic.pl/archive/0001/01/01/meffing-with-castle-windsor.aspx. Windsor has ability for interception, but currently i don't really need IOC that much, MEF injection is enough, it would be nice if MEF has that ability.. – ktutnik Aug 07 '10 at 22:42
  • @ktutnik Your link is wrong, I think you meant http://kozmic.net/2009/04/05/meffing-with-castle-windsor/ – Omer Raviv Feb 09 '13 at 08:12