开发者

What happened to Lazy<T> support in Autofac?

In beta builds of Autofac 2.1 there was 开发者_如何转开发support for automatic resolution of Lazy<T> as described in Nicholas Blumhardt's Lazing Around with Autofac blog post.

The code still seems to be in the source on Google Code, but I can't find LazyDependencyModule in any of the .NET 4.0 binaries I've looked at. Has it moved somewhere else?

How do I use Autofac's automatic Lazy<T> resolution with the latest Autofac builds?


You don't need to register LazyDependencyModule yourself in the production Autofac 2 builds. It is a part of the default container, so just register T and Lazy<T> will be provided.

Make sure you're not accidentally using a .NET 3.5 binary, too :)

Nick

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜