Hi,
I have fairly recently upgrade to Castle 3.2.0 and almost everything is working correctly except that I have some interceptors that are not firing. As far as I can tell I have followed the docs. The registration code looks like this:
Classes.FromAssembly(typeof(ISafeAndSecure).Assembly).Where(
t => typeof (ISafeAndSecure).IsAssignableFrom(t))
.Configure(c => c.Interceptors(
InterceptorReference.ForType<InboundCharacterRemovalInterceptor>(),
InterceptorReference.ForType<SecureArmInterceptor>(),
InterceptorReference.ForType<LoggingInterceptor>())
).WithService.FirstInterface()
All of the components are resolved correctly but the interceptors do not fire.
Other components registered individually with interceptors are fine and work correctly e.g.
Component.For<IResourcePreferencesService>().ImplementedBy<ResourcePreferencesService>()
.LifeStyle.Is(requestLifestyle)
.Interceptors(new InterceptorReference(typeof (PreferenceCachingInterceptor)))
.First
This one does not have a problem.
Is there anything obvious wrong here?
I know I am declaring the InterceptorReference in a slightly different way in the top one (using generics), but I have tried it both ways and it still doesn't work.
Thanks,
Julian.