随笔分类 -  IOC

IOC
摘要:实例范围决定如何在请求之间共享服务。 原文地址:http://docs.autofac.org/en/latest/lifetime/instance-scope.html 每个依赖一个实例 使用这个选项,每次请求服务都会返回一个新实例。使用 InstancePerDependency() 指定。这 阅读全文
posted @ 2017-05-10 15:03 b̶i̶n̶g̶.̶ 阅读(203) 评论(0) 推荐(0) 编辑
摘要:/// /// Autofac容器 /// public class AutofacContainer { public static IContainer Container { get; private set; } public static void Set(IContainer c) { ... 阅读全文
posted @ 2016-11-15 10:11 b̶i̶n̶g̶.̶ 阅读(257) 评论(0) 推荐(0) 编辑
摘要:/// /// Cors扩展 /// public static class IPipelinesExtensions { /// /// CORS Enable /// /// pipelines public static void UserCors(this IP... 阅读全文
posted @ 2016-08-31 13:19 b̶i̶n̶g̶.̶ 阅读(574) 评论(0) 推荐(0) 编辑
摘要:1.NuGet获取Ninject.dll选中项目右键:.NET技术交流群 199281001 .欢迎加入。2.全局注册 Global.asax.cs1 //注册Ninject依赖注入全局解析器2 GlobalConfiguration.Configuration.DependencyResolve... 阅读全文
posted @ 2014-07-21 09:49 b̶i̶n̶g̶.̶ 阅读(1380) 评论(4) 推荐(1) 编辑