摘要: 1.nuget安装postsharp 2.编写attribute标记 [Serializable] [AttributeUsage(AttributeTargets.Method, AllowMultiple = true, Inherited = true)] public class Custo 阅读全文
posted @ 2017-06-22 16:39 Ace001 阅读(540) 评论(0) 推荐(0) 编辑
摘要: 1.winform用法: nuget安装autofac var service = container.Resolve<UserService>(); //解析;并没有实例化new UserService也没有传入构造函数参数,autofac自动注入了 if (service!=null) { va 阅读全文
posted @ 2017-06-22 14:51 Ace001 阅读(659) 评论(3) 推荐(0) 编辑