The container is a object factory. It will create an instance mapped to provided type.(ObjectContainer是一个对象工厂。它将根据你提供的类型在映射表中找到对应的类型,并且返回一个该类型的实例。)
The container is a object lifetime manager. It has two types of object context. One is shared, another is transient. The default transient context is PerWebRequestLifetimeManager, and you can implement your LifetimeManager, and replace default value. But the shared can NOT be replace.(ContextContainer是用来管理对象的生命周期,它有两种类型。一种是全局,一种是临时。临时的上下文为web的一次请求,不过你可以自己实现一个LifetimeManager,并且替换默认的PerWebRequestLifetimeManager。但是全局的上下文不能被替换。)
The default ExportProvider will be scan all assembly, and find the exported contract with ExportAttribute/OrderedExportAttribute. The contracts will be provided to ObjectContainer, let it can find the mapped type to create an instance.

Getting Started

Last edited Dec 31, 2010 at 1:56 PM by cnlangzi, version 7


No comments yet.