Castle.DynamicProxy2 生成委托类型的代理
有没有办法创建委托类型的代理并让它在 DynamicProxy2 中实现附加接口,并且还能够拦截对生成的委托的调用?
我通常生成代理的方式会抛出异常,因为委托类型是密封的。
Is there a way to create a proxy of a delegate type and have it implement additional interfaces in DynamicProxy2 and also being able to intercept calls to the generated delegate?
The way i normaly generate proxies throws an exception because delegate types are sealed.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Patrik,
您不需要 DynamicProxy 来“代理”代表
这应该足够了:
[更新:该问题与这个特定问题无关]
您想为此公开什么样的 API?
如果您想跟进此对话,请通过电子邮件与我联系,或在 Castle 用户组上发起话题。
Patrik,
You don't need DynamicProxy to 'proxy' delegates
This should be enough:
[UPDATE: that aswer was not relevant to this specific problem]
What kind of API do you want to expose for this?
If you want to follow up with this conversation please contact me via email, or start a thread on Castle users group.