Using Castle.Windsor, how would I go about adding a IProxyGenerationHook or selector for one of several interceptors defined for a specific service. For example consider the following component registration:
container.Register( _
Component.For(Of IDataLoader) _
.ImplementedBy(Of sqlldrDataLoader) _
.Interceptors(Of LoggingInterceptor, FancySchmancyInterceptor))
The IDataLoader service has several methods. I want the following: a) LoggingInterceptor will intercept every method. b) FancySchmancyInterceptor should only intercept a subset of methods as defined in a selector of some description.
Many thanks, Ryan.
.SelectInterceptorsWith(s => s.Service<YourSelectorComponent>())
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.