惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Forbes - Security
Forbes - Security
H
Hackread – Cybersecurity News, Data Breaches, AI and More
N
Netflix TechBlog - Medium
Engineering at Meta
Engineering at Meta
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
F
Fortinet All Blogs
P
Privacy & Cybersecurity Law Blog
The Hacker News
The Hacker News
博客园 - 司徒正美
博客园 - 聂微东
T
The Blog of Author Tim Ferriss
I
Intezer
WordPress大学
WordPress大学
Security Archives - TechRepublic
Security Archives - TechRepublic
Scott Helme
Scott Helme
T
Threat Research - Cisco Blogs
T
Tailwind CSS Blog
月光博客
月光博客
Recent Announcements
Recent Announcements
博客园 - 叶小钗
J
Java Code Geeks
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
L
LINUX DO - 热门话题
Google DeepMind News
Google DeepMind News
C
Cyber Attacks, Cyber Crime and Cyber Security
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
N
News and Events Feed by Topic
A
Arctic Wolf
B
Blog RSS Feed
Recorded Future
Recorded Future
D
DataBreaches.Net
有赞技术团队
有赞技术团队
Project Zero
Project Zero
U
Unit 42
T
Tor Project blog
The GitHub Blog
The GitHub Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
C
CERT Recently Published Vulnerability Notes
博客园 - Franky
博客园 - 【当耐特】
Microsoft Security Blog
Microsoft Security Blog
C
Cybersecurity and Infrastructure Security Agency CISA
Security Latest
Security Latest
C
Cisco Blogs
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Blog — PlanetScale
Blog — PlanetScale
H
Heimdal Security Blog
Vercel News
Vercel News
Stack Overflow Blog
Stack Overflow Blog
S
Securelist

博客园 - Dorian Deng

IE9 支持的是 H.264 视频标准,不是苹果 Safari 深入 Unity 1.x 依赖注入容器之四:依赖注入 深入 Unity 1.x 依赖注入容器之三:获取对象 深入 Unity 1.x 依赖注入容器之二:初始化 Unity 深入 Unity 1.x 依赖注入容器之一:入门 Unity 1.0 中文文档:1 - Unity 简介 使用 Unity Application Block(三):理解和使用依赖注入的键 使用 Unity(二):配置 Unity 、读取配置信息和获取对象 使用 Unity(一):Unity 应用程序块容器介绍 EntLib 4.0 和 Unity 的开发团队 [译]EntLib V4 产品需求总表(Product Backlog)(更新:2008-1-14) 简单是一种美:提高项目成功率的一些方法 Enterprise Library 异常处理应用程序块的设计 Enterprise Library 异常处理应用程序块关键场景 Enterprise Library 异常处理应用程序块开发任务的细节 使用 Enterprise Library 异常处理应用程序块开发 Enterprise Library 异常处理应用程序块简介 Enterprise Library 数据访问应用程序块快速入门 Enterprise Library 数据访问应用程序块的部署和操作
Unity Feb 26 Weekly Drop
Dorian Deng · 2008-02-29 · via 博客园 - Dorian Deng

2月26日,Unity 又发布了新的版本,让我们来看看有什么改变!

新的特性

  • SetLifetime 方法允许指定用于特殊依赖的 LifetimeManager 对象。LifetimeManager 用于已存在的单件和实例的存在方式,并且易于编写自己的 LifetimeManager。例如,这为实现每个 ASP.NET 请求语义的需要提供了底层的支持。

当前,SetSingleton 和 RegisterInstance 依然是可用的,在它的内部使用了 LifetimeManager。

  • Teardown:BuildUp 的相反的方法。容器现在包含了一个 Teardown 方法,对象可以运行它来关闭、清除、以及进行所需要的操作。已有的容器行为是在 Teardown 的时候不进行任何操作,但扩展可以利用它。
  • 扩展可以实现 IDisposable:如果扩展对象实现了 IDisposable,在容器进行销毁时,它将被销毁。

用户可见的改变

  • 如果容器在解析依赖时无法构造它,容器将抛出一个异常,而不是返回 null。
  • 加入了 NotPresentBehavior。不会经常使用它,已有的实现在含有 LifetimeManager 的情况下不能工作。所有的依赖现在的行为都像 NotPresentBehavior.Build,它总是默认值。
  • 新的异常:任何失败都会导致 ResolutionFailedException,包括名称和类型的请求。内部异常包含了实质的异常,它提供了关于在失败时构造什么和失败发生在什么地方的完整细节。

内部改变

  • 解析参数的 IL 生成步骤已经被重写。代替用特性生成 IL,解析参数的值将发出对 IDependencyResolverPolicy 的调用。不同的选择器策略在选择目标时可以响应解析到策略列表中。这提供了不需要使用特性配置类型上的依赖所需要的基础设施。 ResolveAttribute 和相关的类已被删除。
  • 临时策略:Object Buidler 的老版本只有临时策略。任何添加到策略列表中的策略在构造过程结束后都将被删除。做为性能的改进,初始发布将这修改为永久策略。但临时策略依然是很有用 的,所以现在 IBuilderContext 有二个策略列表对象 Policies 和 PersistentPolicies。如果在构建结束后将策略票证添加到 PersistentPolicies,或者添加到 Policies 创建一个临时策略。通常,在查找一个策略时,将继续使用 Policies,后来的查找将同时搜索临时的和永久的策略。
  • 当然还有调整和修正。

目前,文档还没有更新到当前的状态,所以与现在的发布不同步。

希望对您有所帮助!

邓明,理想&美人

posted @ 2008-02-29 00:46  Dorian Deng  阅读(2683)  评论()    收藏  举报