开发者

Can I specify to Castle Windsor which virtual methods to override in a class proxy?

I have many virtual methods in a class, but only one should be intercepted, Can I tell Castle Windsor to override only that method so I dont have to do validation in the Intercept 开发者_如何转开发method?

Edit:

I use the IKernelEvents.ComponentRegistered event to choose which types get the interceptor.


  1. If you want to proxy just one method, use IProxyHook to pick which method you want to proxy.
  2. If you're modifying ComponentModel (and adding interceptors or proxy hooks is one such operation) use IContributeComponentModelConstructions for that. See the docs for more in depth explanation.
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜