views:

40

answers:

1

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?

+1  A: 

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
maybe i should start to make the hard way.. :) thanks..
ktutnik
@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
@Daniel Plaisted, 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