tags:

views:

61

answers:

1

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?

+2  A: 

Hi Graeme,

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

Nicholas Blumhardt
You're right, I must have got my assembly versions in a pickle. It's working now, thanks!
GraemeF