Unity 1.2 Interception

Jul 7, 2011 at 9:31 PM

Hi unity team (and avanade support !),

i'm trying to implement simple unity iterception based on David Hayden example (link).

I can't compile my code here what i got :

'Microsoft.Practices.Unity.InterceptionExtension.Interception' does not contain a definition for 'SetInjectorFor' and no extension method 'SetInjectorFor' accepting a first argument of type 'Microsoft.Practices.Unity.InterceptionExtension.Interception' could be found (are you missing a using directive or an assembly reference?)

I only have access to the "SetInterceptorFor" method;  but this one throw me the following exception: 

The type xxx.xxx.xxx.xxx.xxxxxxxxxx is not interceptable.Parameter name: typeToIntercept

What is wrong with this extension? 

Thanks in advance

ps: I don't plan to switch to EntLib 5 so if you have a solution with 4.1 it will be warmly welcome.

Jul 8, 2011 at 7:08 AM
Edited Jul 8, 2011 at 7:08 AM


Unfortunately we can't reproduce your scenario. Can you post your relevant code here so we can investigate it further.


Noel Angelo Bolasoc
Global Technologies and Solutions
Avanade, Inc.