仅拦截服务,而不是在Windsor中实施

时间:2013-04-23 09:10:15

标签: dependency-injection castle-windsor interceptor castle-dynamicproxy

我有这段代码:

container.Register(
    Component.For(typeof(MyServiceInterceptor<>)),
    Component.For<IMyService<string>, MyServiceImpl<string>>()
        .Interceptors(typeof(MyServiceInterceptor<>))
        .Anywhere
)

Windsor为MyServiceImpl&lt;&gt;生成代理类。但是我想只拦截IMyService&lt;&gt;方法。怎么做?

0 个答案:

没有答案