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>())
.First.LifeStyle.Is(LifestyleType.PerWebRequest)
).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.
--
You received this message because you are subscribed to the Google Groups
"Castle Project Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/castle-project-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.