Is there possibility to configure Interceptor to hook methods only of special interface, or by base class? Currently I have registered Interceptor that works with scope of connections to one DB. Now I added another scope working with another db and want to add another interceptor, which will hook methods of second scope. It is possible to configure interceptor via xml files, instead of checking target of invocation properties.
我通过部件添加拦截器:
<component
type="Common.IoC.SessionScopeInterceptor, Common"
lifestyle="transient">
</component>
AFAIK这一拦截器拦截了在风.集装箱内登记的所有班级的所有方法。
我也想补充这样的内容。
<component
type="Common.IoC.SessionScopeInterceptor, Common"
lifestyle="transient"
interceptOnlyVirtualMethods="true"
interceptClass="Common.IoC.SessionScope1, Common"
>
</component>