IoC/DI库 SimpleInjector
- 授权协议: MIT
- 开发语言: C# .NET
- 操作系统: Windows
- 软件首页: http://simpleinjector.codeplex.com
- 软件文档: http://simpleinjector.codeplex.com/documentation
软件介绍
SimpleInjector是一个基于.NET3.5的、简单易用的IoC/DI库。
SimpleInjector完全支持基于代码配置,对不太熟悉IoC/DI框架的开发人员是一种不错的选择。
使用
public class UserController : Controller
{
private readonly IUserRepository repository;
private readonly ILogger logger;
// Use constructor injection for the dependencies
public UserService(IUserRepository rep, ILogger logger)
{
this.repository = rep;
this.logger = logger;
}
// implement UserController methods here.
}
配置
protected void Application_Start(object sender, EventArgs e)
{
// 1. Create a new Simple Injector container
var container = new Container();
// 2. Configure the container (register)
container.Register();
container.RegisterSingle(() => new CompositeLogger(
container.GetInstance(),
container.GetInstance()
));
// 3. Optionally verify the container's configuration.
container.Verify();
// 4. Register the container as MVC3 IDependencyResolver.
DependencyResolver.SetResolver(new SimpleInjectorDependencyResolver(container));
}
UML基础与Rose建模教程
人民邮电出版社 / 人民邮电出版社 / 2006-1 / 36.00元
《UML基础与Rose建模教程》全面,详细地介绍了 UML 的基础知识和Rational Rose的使用方法,并通过4个综合性的案例,展示了使用UML和Rose进行软件建模的具体方法和步骤。全书共分20章,前4章是基础部分,介绍了UML和Rose的基础知识;第5章到第13章是《UML基础与Rose建模教程》的重点,介绍了UML的9种图和组成元素,以及相关的建模技术,并在每章的最后介绍了各种图在Ro......一起来看看 《UML基础与Rose建模教程》 这本书的介绍吧!
