I register the dependency as follows:
this.Container.RegisterType<IFoo, Foo>(
new ContainerControlledLifetimeManager(),
new InterceptionBehavior<PolicyInjectionBehavior>(), new Interceptor<InterfaceInterceptor>());
this works great. However, when I resolve Fooinstead IFoo, I get an error:
ArgumentException - the passed type must be an interface.
It seems Unity is still trying to apply InterfaceInterceptorto this dependency. But why?
source
share