The inject property in Autofac

I am compiling: PropertyInject wiki page

why is this line:

builder.RegisterType<A>().InjectProperties();

      

won't compile? how to make an inject property in autofac?

I am using vs2010, autofac 2.1.13.813.

EDIT: After researching, PropertyInjection should be like new version of AutoFac:

builder.RegisterType<RepositoryClient>().PropertiesAutowired(false);

      

and it works.

+2


a source to share





All Articles