XmlSerializer 大法好

请原谅我之前的愚昧无知。我已经决定完全分离对象模型和对象的逻辑行为了。

引用使用 Id 保存,即类中不再出现对其他类的直接引用,而仅仅保存 Id。这样在序列化的时候就可以直接保存了。

XmlSerializer 是线程安全的。
XmlSerializer 是线程安全的。

然而我发现处理 Nullable 类型还是一个很麻烦的问题……
c# – Is there any way for my class to support serialisation as an XML attribute? – Stack Overflow

所以我要自己造轮子!

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注

ERROR: si-captcha.php plugin: GD image support not detected in PHP!

Contact your web host and ask them to enable GD image support for PHP.

ERROR: si-captcha.php plugin: imagepng function not detected in PHP!

Contact your web host and ask them to enable imagepng for PHP.

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据

Content is available under CC BY-SA 3.0 unless otherwise noted.