开发者

Control the order Interceptors are executed

How can I manage in what order Interceptors ar开发者_运维技巧e executed?

I would like to have a general exception interceptor outermost.


Use .First, .Last or .AtIndex() to control interceptor ordering when declaring the interceptor reference, e.g.:

 container.Register(
    Component.For<ISomething>()
    .ImplementedBy<Something>()
    .Interceptors(InterceptorReference.ForKey("myinterceptor")).Last);

Or use .Anywhere if you don't care about ordering.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜