惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Google DeepMind News
Google DeepMind News
博客园 - 聂微东
Vercel News
Vercel News
aimingoo的专栏
aimingoo的专栏
F
Fortinet All Blogs
Microsoft Security Blog
Microsoft Security Blog
MongoDB | Blog
MongoDB | Blog
B
Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
WordPress大学
WordPress大学
Apple Machine Learning Research
Apple Machine Learning Research
阮一峰的网络日志
阮一峰的网络日志
大猫的无限游戏
大猫的无限游戏
GbyAI
GbyAI
Martin Fowler
Martin Fowler
M
MIT News - Artificial intelligence
The GitHub Blog
The GitHub Blog
博客园_首页
博客园 - 叶小钗
腾讯CDC
G
Google Developers Blog
Blog — PlanetScale
Blog — PlanetScale
宝玉的分享
宝玉的分享
D
Docker

博客园 - 十三

ASP.NET MVC5学习笔记之Action参数模型绑定之模型元数据和元数据提供 ASP.NET MVC5学习笔记之Action参数模型绑定值提供体系 ASP.NET MVC5学习笔记之Action参数模型绑定基本过程 ASP.NET MVC5学习笔记之Filter提供体系 ASP.NET MVC5学习笔记之Filter基本介绍 ASP.NET MVC5学习笔记之Controller执行ControllerDescriptor和ActionDescriptor ASP.NET MVC5学习笔记之Controller同步执行架构分析 ASP.NET MVC4学习笔记之Controller激活的扩展 ASP.NET MVC4学习笔记之Controller的激活 ASP.NET MVC4学习笔记路由系统实现 ASP.NET MVC4学习笔记路由系统概念与应用篇 ASP.NET MVC4学习笔记之总体概述 Web Capacity Analysis Tool 压力测试工具使用笔记 WCF完全解析读书笔记第2章地址 CLR via C# 混合线程同步构造 CLR via C# I/O基元线程同步构造 CLR via C# 计算限制的异步操作读书笔记 CLR via C# 线程基础知识读书笔记 CLR via C# 内存管理读书记
CLR via C# 序列化读书笔记
十三 · 2013-07-21 · via 博客园 - 十三

1. 序列化格式类

  a. 二进制BinaryFormatter

  b. XML流 NetDataContractSerializer

      c. CLR类据类型与非CLR数据类型之间互操作 XmlSerializer, DataContractSerializer

2.使类型可以序列化,应用SerializableAttribute, 使用NonSerializedAttribute指明那些字段不序列化

3.反序列化时, 应用OnDeserializedAttribute在类型某个方法上为类型反序列化后初始化对象

4.OnSerialzingAttribute, OnSerializedAttribute, OnDeserializingAttribute 分别控制在序列化时,序列化后,反序列化时调用标识方法

  OnSerialzingAttribute=>OnSerializedAttribute=>OnDeserializingAttribute=>OnDeserializedAttribute

5.使用OptionFieldAttribute 标识类型列序化后添加的新字段

6.序列化器使用FormatterServices 实现序列化和反序列化

7.实现ISerializable接口完全控制序列化/反序列化,

8.使用序列化代理 实现ISerializationSuggrogate接口, 使用SurrogateSelector

9.反序列化时重写程序集或类型 SerializationBinder