序列化ContractException [英] Serializing ContractException

查看:82
本文介绍了序列化ContractException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

只是对重写器生成的 ContractException 类的查询:它是用
SerializableAttribute 装饰的吗?我已经查看了生成的程序集,它看起来不是,这与我在异常处理期间遇到的一些例外情况一致,即说已捕获的异常无法序列化。

Just a query on the ContractException class that is generated by the rewriter: is it decorated with SerializableAttribute? I've peeked into the generated assembly and it looks like it's not, which would be consistent with some exceptions I'm getting during my exception handling to say that the exception that's been caught is unable to be serialized.

我真的很想开始使用代码契约支持作为我的BizTalk解决方案的一部分,但在BizTalk世界中,几乎所有东西都需要可序列化。

I'm really keen to start using the code contracts support as part of my BizTalk solutions, but in the BizTalk world pretty much everything needs to be serializable.

是否有是否计划使用 SerializableAttribute 标记此生成的类,如果是,是否有ETA?如果没有,我最好的延伸点是什么才能改变这种行为?通过覆盖如何生成此类(包括
SerializableAttribute )或拦截合同失败的运行时处理来抛出我自己的异常,即
可序列化?

Are there any plans to mark this generated class with SerializableAttribute, and if so, is there an ETA? If not, what's the best extension point for me to hook into to change this behaviour? Either by overriding how this class is generated (to include SerializableAttribute) or to intercept the runtime handling of contract failures to throw my own exception that is serializable?

感谢您的帮助!

推荐答案

这是一个很好的问题!


这篇关于序列化ContractException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆