protobuf.net Handling of Nullable<DateTimeOffset>

寵の児 提交于 2019-12-11 11:55:05

问题


How can i serialize Nullable types with protobuf.net? This post tries to explain a few approaches: Can I serialize arbitrary types with protobuf-net?

The problem is that there seems to be a bug with the surrogate approach in relation to Nullable, which is also mentioned in the linked post. The shim property approach is not suitable for us, mainly because we have many properties of this type.

We are very keen on relying on protobuf.net for serialization as it matches our need for compact and fast serialization, but it is difficult due to this issue.


回答1:


A picture says a thousand words...



来源:https://stackoverflow.com/questions/11426516/protobuf-net-handling-of-nullabledatetimeoffset

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!