摘要: http://www.cnblogs.com/henryzhu/archive/2013/01/27/csharp-5-new-callerinformation.html 去年8月,Visual Studio 2012和.NET Framework 4.5已经完成了,在.NET Framework 阅读全文
posted @ 2016-06-20 23:18 shiningrise 阅读(359) 评论(0) 推荐(0) 编辑
摘要: using System; using System.Collections.Generic; using System.Linq; using System.Text; using PostSharp.Laos; using PostSharp; namespace PostSharpApp { [MyTrace(AttributeTargetMembers="Test*")] ... 阅读全文
posted @ 2016-06-20 20:12 shiningrise 阅读(151) 评论(0) 推荐(0) 编辑
摘要: 使用PostSharp 在.NET 平台上实现 AOP 摘要 本文首先介绍AOP(面向方面编程)的相关概念及理论,然后介绍如何使用PostSharp框架在.NET平台上实现AOP,最后对PostSharp的机制及AOP的优劣进行一个简单的分析。 AOP(Aspect-Oriented Program 阅读全文
posted @ 2016-06-20 19:33 shiningrise 阅读(362) 评论(0) 推荐(0) 编辑
摘要: C#中事件的使用 http://www.cnblogs.com/wayfarer/archive/2004/04/20/6712.html 用一个例子来说明事件的使用。 创建一个简单的类,名为FileWatch,包含事件OnfileChange。该类将检查在执行应用程序的目录(当前 目录,通常是项目 阅读全文
posted @ 2016-06-20 19:21 shiningrise 阅读(2223) 评论(0) 推荐(0) 编辑
摘要: http://www.codeproject.com/Articles/1080517/Aspect-Oriented-Programming-using-Interceptors-wit Download sample application (or see the latest on Githu 阅读全文
posted @ 2016-06-20 18:42 shiningrise 阅读(329) 评论(0) 推荐(0) 编辑
摘要: 通过反射将变量值转为变量名本身 这是.NET反射的一个有趣小例子: 通过反射将变量值转为变量名本身. 当然要先添加命名空间:using System.Reflection; 示例代码如下: class Program { string name = "strA"; string strA = "st 阅读全文
posted @ 2016-06-20 16:51 shiningrise 阅读(507) 评论(0) 推荐(0) 编辑
摘要: .NET 中获取调用方法名 在写记录日志功能时,需要记录日志调用方所在的模块名、命名空间名、类名以及方法名,想到使用的是反射(涉及到反射请注意性能),但具体是哪一块儿还不了解,于是搜索,整理如下: 需要添加相应的命名空间: using System; using System.Diagnostics 阅读全文
posted @ 2016-06-20 16:10 shiningrise 阅读(517) 评论(0) 推荐(0) 编辑
摘要: https://github.com/aspnetboilerplate https://github.com/tangxuehua/enode daxnet的Apworks框架 http://www.cnblogs.com/mienreal/p/4340864.html https://githu 阅读全文
posted @ 2016-06-20 14:17 shiningrise 阅读(216) 评论(0) 推荐(0) 编辑
// 侧边栏目录 // https://blog-static.cnblogs.com/files/douzujun/marvin.nav.my1502.css