protobuf.net 处理 Nullable<DateTimeOffset> [英] protobuf.net Handling of Nullable&lt;DateTimeOffset&gt;

查看:66
本文介绍了protobuf.net 处理 Nullable<DateTimeOffset>的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用 protobuf.net 序列化 Nullable 类型?这篇文章试图解释一些方法:我可以用 protobuf 序列化任意类型吗-网?

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?

问题是与 Nullable 相关的代理方法似乎存在错误,链接帖子中也提到了这一点.shim 属性方法不适合我们,主要是因为我们有很多这种类型的属性.

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.

我们非常热衷于依赖 protobuf.net 进行序列化,因为它符合我们对紧凑和快速序列化的需求,但由于这个问题而很难.

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.

推荐答案

一张图说一千个字...

A picture says a thousand words...

这篇关于protobuf.net 处理 Nullable<DateTimeOffset>的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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