控制订单拦截器执行
答
使用.First
,.Last
或.AtIndex()
以声明的时候拦截参考,例如:
container.Register(
Component.For<ISomething>()
.ImplementedBy<Something>()
.Interceptors(InterceptorReference.ForKey("myinterceptor")).Last);
控制拦截器的顺序或者使用.Anywhere
,如果你不关心排序。
或者如果你需要更多的动态控制(我从你的问题推断你没有),你可以使用'IInterceptorsSelector' – 2010-12-17 14:05:11
添加到文档:http://stw.castleproject.org/Windsor.Registering-Interceptors- ProxyOptions.ashx?NS =温莎#Ordering_interceptors_1 – 2010-12-17 14:20:04