2014年12月10日

关于MarshalByRefObject的解释

摘要: 首先了解一下不同应用程序域中的对象的通信方式有两种:一种是跨应用程序域边界传输对象副本一种是使用代理交换消息。简单来讲,继承此类的对象可以跨越应用程序域边界被引用,甚至被远程引用.当一个对象需要长途跋涉到另一个环境中时,需要将其marshal成一个可以传输的形态(比如在.NET Remoting中对... 阅读全文

posted @ 2014-12-10 13:14 Freedom0619 阅读(110) 评论(0) 推荐(0) 编辑

2014年12月8日

利用反射实现序列化和反序列化

摘要: 主程序using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.IO;using System.Runtime.Serialization;using System.R... 阅读全文

posted @ 2014-12-08 15:49 Freedom0619 阅读(394) 评论(0) 推荐(0) 编辑

2014年12月1日

利用反射实现序列化和反序列化

摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.IO;using System.Runtime.Serialization;using System.Runt... 阅读全文

posted @ 2014-12-01 16:33 Freedom0619 阅读(192) 评论(0) 推荐(0) 编辑

2014年11月28日

Protobuf-net实现序列化

摘要: 引入Protobuf-net的dll,using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.IO;using System.Runtime.Serializatio... 阅读全文

posted @ 2014-11-28 13:09 Freedom0619 阅读(515) 评论(0) 推荐(0) 编辑

2014年11月25日

三种序列化方式性能比较

摘要: 一下代码比较了二进制序列化、xml序列化、Protobuf序列化的运行时间,可是代码显得十分冗余,是否有大神可以指点一二,万分感谢using System;using System.Collections.Generic;using System.Linq;using System.Text;usi... 阅读全文

posted @ 2014-11-25 18:07 Freedom0619 阅读(382) 评论(0) 推荐(0) 编辑

2014年11月21日

读写锁学习(3)——微软源码实现的阅读

摘要: 以下是微软源码,主要看了申请读锁EnterReadLock()、申请写锁EnterWriteLock()、释放读锁ExitReadLock()、释放写锁ExitWriteLock()这四个方法,在下研究了两天,里面有很多细节问题还是了解的不够透彻,表述如有错误希望各位大神能指点一下,主要是通过myL... 阅读全文

posted @ 2014-11-21 17:43 Freedom0619 阅读(167) 评论(0) 推荐(0) 编辑

读写锁学习(2)——ReaderWriterLock学习

摘要: using System.Collections.Generic;using System.Threading;namespace FYSTest{ public partial class MainWindow { List list = new List(); ... 阅读全文

posted @ 2014-11-21 17:36 Freedom0619 阅读(167) 评论(0) 推荐(0) 编辑

读写锁学习(1)——ReaderWriterLock学习

摘要: 读写锁的目的:将读和写分离,可以实现多个用户的读操作,但是写操作只能有一个用户执行。实例:using System;using System.Threading;namespace ProcessTest{ class Program { static int theRes... 阅读全文

posted @ 2014-11-21 17:26 Freedom0619 阅读(224) 评论(0) 推荐(0) 编辑

导航