摘要:
工作中遇到这样的情况,项目开发之前,没提过什么日志的东西。项目开发的差不多了,说需要记录日志文件。比如客户端调用服务器的时候,都什么时间,谁,调用了什么之类的。目前还不确定,这个日志到底要怎么记录,以及都记录哪些信息。上网查询了一下 AOP 的东西,实现办法还真不少。这里就写个简单的,使用 Attribute 实现的例子。首先是个 目标类,也就是针对这个类的方法,来做AOP的操作。using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace A0075_AOPAttrib 阅读全文
posted @ 2011-07-26 21:19
遥望星空
阅读(1193)
评论(1)
推荐(0)
摘要:
using System;using System.Text;using System.IO;using ICSharpCode.SharpZipLib.BZip2;using ICSharpCode.SharpZipLib.GZip;using ICSharpCode.SharpZipLib.Zip;namespace Compression{ /**//// <summary> /// 压缩方式。 /// </summary> public enum CompressionType { /**//// <summary> /// GZip 压缩格式 // 阅读全文
posted @ 2011-07-26 20:53
遥望星空
阅读(1062)
评论(0)
推荐(0)

浙公网安备 33010602011771号